diff --git a/lib/Cake/TestSuite/CakeTestLoader.php b/lib/Cake/TestSuite/CakeTestLoader.php index 5f9600adb07..f1a347a48ff 100644 --- a/lib/Cake/TestSuite/CakeTestLoader.php +++ b/lib/Cake/TestSuite/CakeTestLoader.php @@ -58,9 +58,10 @@ protected static function _basePath($params) { if (!CakePlugin::loaded($params['plugin'])) { try { CakePlugin::load($params['plugin']); - $pluginPath = CakePlugin::path($params['plugin']); - $result = $pluginPath . 'Test' . DS . 'Case'; + $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case'; } catch (MissingPluginException $e) {} + } else { + $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case'; } } return $result;