Skip to content
This repository
Browse code

Fixing test that failed when no models were found in app.

  • Loading branch information...
commit 0eef6577e2b58b154f347e2d181f75e86fffefca 1 parent ddc341e
Mark Story authored June 30, 2009
5  cake/tests/cases/console/libs/tasks/test.test.php
@@ -258,6 +258,11 @@ function testRegistryClearWhenBuildingTestObjects() {
258 258
  * @return void
259 259
  **/
260 260
 	function testGetClassName() {
  261
+		$objects = Configure::listObjects('model');
  262
+		$skip = $this->skipIf(empty($objects), 'No models in app, this test will fail. %s');
  263
+		if ($skip) {
  264
+			return;
  265
+		}
261 266
 		$this->Task->setReturnValueAt(0, 'in', 'MyCustomClass');
262 267
 		$result = $this->Task->getClassName('Model');
263 268
 		$this->assertEqual($result, 'MyCustomClass');

0 notes on commit 0eef657

Please sign in to comment.
Something went wrong with that request. Please try again.