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

This commit is contained in:
mark_story 2009-06-30 21:22:10 -04:00
parent ddc341e4de
commit 0eef6577e2

View file

@ -258,6 +258,11 @@ class TestTaskTest extends CakeTestCase {
* @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');