Merge pull request #84 from tPl0ch/2.0-testloader

Adding a failsafe plugin load in tests case runner so it is possible to run tests on plugins that have not been loaded in bootstrap
This commit is contained in:
José Lorenzo Rodríguez 2011-05-18 23:07:55 -07:00
commit a19ff8e20f

View file

@ -54,7 +54,10 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
$result = CORE_TEST_CASES;
} elseif (!empty($params['app'])) {
$result = APP_TEST_CASES;
} else if (!empty($params['plugin']) && CakePlugin::loaded($params['plugin'])) {
} else if (!empty($params['plugin'])) {
if (!CakePlugin::loaded($params['plugin'])) {
CakePlugin::load($params['plugin']);
}
$pluginPath = CakePlugin::path($params['plugin']);
$result = $pluginPath . 'Test' . DS . 'Case';
}