diff --git a/lib/Cake/TestSuite/CakeTestLoader.php b/lib/Cake/TestSuite/CakeTestLoader.php index 1cf2e5da749..223ec85e7a8 100644 --- a/lib/Cake/TestSuite/CakeTestLoader.php +++ b/lib/Cake/TestSuite/CakeTestLoader.php @@ -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'; }