Fixing recently broken tests

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-19 21:35:51 -04:30
parent 38ad1bfc62
commit 85c505fd4f
2 changed files with 10 additions and 8 deletions

View file

@ -88,11 +88,11 @@ class PluginTaskTest extends CakeTestCase {
'Controller' . DS . 'Component', 'Controller' . DS . 'Component',
'Lib', 'Lib',
'View' . DS . 'Helper', 'View' . DS . 'Helper',
'tests' . DS . 'Case' . DS . 'Controller' . DS . 'Component', 'Test' . DS . 'Case' . DS . 'Controller' . DS . 'Component',
'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper', 'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper',
'tests' . DS . 'Case' . DS . 'Model' . DS . 'Behavior', 'Test' . DS . 'Case' . DS . 'Model' . DS . 'Behavior',
'tests' . DS . 'Fixture', 'Test' . DS . 'Fixture',
'vendors', 'Vendor',
'webroot' 'webroot'
); );
foreach ($directories as $dir) { foreach ($directories as $dir) {

View file

@ -56,10 +56,12 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
$result = APP_TEST_CASES; $result = APP_TEST_CASES;
} else if (!empty($params['plugin'])) { } else if (!empty($params['plugin'])) {
if (!CakePlugin::loaded($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; return $result;
} }