diff --git a/lib/Cake/Test/Case/Console/Command/Task/PluginTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/PluginTaskTest.php index d6a5d5d6d..9db7cb905 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/PluginTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/PluginTaskTest.php @@ -88,11 +88,11 @@ class PluginTaskTest extends CakeTestCase { 'Controller' . DS . 'Component', 'Lib', 'View' . DS . 'Helper', - 'tests' . DS . 'Case' . DS . 'Controller' . DS . 'Component', - 'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper', - 'tests' . DS . 'Case' . DS . 'Model' . DS . 'Behavior', - 'tests' . DS . 'Fixture', - 'vendors', + 'Test' . DS . 'Case' . DS . 'Controller' . DS . 'Component', + 'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper', + 'Test' . DS . 'Case' . DS . 'Model' . DS . 'Behavior', + 'Test' . DS . 'Fixture', + 'Vendor', 'webroot' ); foreach ($directories as $dir) { diff --git a/lib/Cake/TestSuite/CakeTestLoader.php b/lib/Cake/TestSuite/CakeTestLoader.php index 223ec85e7..5f9600adb 100644 --- a/lib/Cake/TestSuite/CakeTestLoader.php +++ b/lib/Cake/TestSuite/CakeTestLoader.php @@ -56,10 +56,12 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { $result = APP_TEST_CASES; } else if (!empty($params['plugin'])) { if (!CakePlugin::loaded($params['plugin'])) { - CakePlugin::load($params['plugin']); + try { + CakePlugin::load($params['plugin']); + $pluginPath = CakePlugin::path($params['plugin']); + $result = $pluginPath . 'Test' . DS . 'Case'; + } catch (MissingPluginException $e) {} } - $pluginPath = CakePlugin::path($params['plugin']); - $result = $pluginPath . 'Test' . DS . 'Case'; } return $result; }