Removed check that made loop to always continue. Moved dependencies refresh to be done before the tested plugin refresh.

This commit is contained in:
Mariano Custiel 2016-01-08 15:34:40 +01:00
parent db5fde4749
commit 902385b4e9
1 changed files with 6 additions and 9 deletions

View File

@ -101,7 +101,7 @@ abstract class PluginTestCase extends Illuminate\Foundation\Testing\TestCase
}
/**
* Since the test environment has loaded all the test plugins
* Since the test environment has loaded all the test plugins
* natively, this method will ensure the desired plugin is
* loaded in the system before proceeding to migrate it.
* @return void
@ -131,11 +131,6 @@ abstract class PluginTestCase extends Illuminate\Foundation\Testing\TestCase
$plugin = $manager->loadPlugin($namespace, $path);
}
/*
* Execute the command
*/
Artisan::call('plugin:refresh', ['name' => $code]);
/*
* Spin over dependencies and refresh them too
*/
@ -143,12 +138,14 @@ abstract class PluginTestCase extends Illuminate\Foundation\Testing\TestCase
if (!empty($plugin->require)) {
foreach ((array) $plugin->require as $dependency) {
if (isset($this->pluginTestCaseLoadedPlugins[$code])) continue;
$this->runPluginRefreshCommand($dependency);
}
}
/*
* Execute the command
*/
Artisan::call('plugin:refresh', ['name' => $code]);
}
/**