Moved check for CakePlugin::loaded() out of if statement in CakeTestLoader::_basePath(). Plugin will only be loaded when the plugin tests are requested.

This commit is contained in:
Thomas Ploch 2011-05-18 17:15:39 +02:00
parent b3e1c2a9ee
commit 35a014045b

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';
}