Browse Source

Fixing recently broken tests

Jose Lorenzo Rodriguez 15 years ago
parent
commit
85c505fd4f

+ 5 - 5
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) {

+ 5 - 3
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;
 	}