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