Skip to content

Commit

Permalink
Fixing test that failed when no models were found in app.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 1, 2009
1 parent ddc341e commit 0eef657
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cake/tests/cases/console/libs/tasks/test.test.php
Expand Up @@ -258,6 +258,11 @@ function testRegistryClearWhenBuildingTestObjects() {
* @return void
**/
function testGetClassName() {
$objects = Configure::listObjects('model');
$skip = $this->skipIf(empty($objects), 'No models in app, this test will fail. %s');
if ($skip) {
return;
}
$this->Task->setReturnValueAt(0, 'in', 'MyCustomClass');
$result = $this->Task->getClassName('Model');
$this->assertEqual($result, 'MyCustomClass');
Expand Down

0 comments on commit 0eef657

Please sign in to comment.