Skip to content

Commit

Permalink
Moved check for CakePlugin::loaded() out of if statement in CakeTestL…
Browse files Browse the repository at this point in the history
…oader::_basePath(). Plugin will only be loaded when the plugin tests are requested.
  • Loading branch information
Thomas Ploch committed May 18, 2011
1 parent b3e1c2a commit 35a0140
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Cake/TestSuite/CakeTestLoader.php
Expand Up @@ -54,7 +54,10 @@ protected static function _basePath($params) {
$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';
}
Expand Down

0 comments on commit 35a0140

Please sign in to comment.