Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding tests for previous commit. Refs #310.

  • Loading branch information...
commit d975dc3190c76067e50e331018552b54f03d5116 1 parent 46948dd
@renan renan authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 cake/tests/cases/console/libs/tasks/model.test.php
View
12 cake/tests/cases/console/libs/tasks/model.test.php
@@ -683,6 +683,9 @@ function testBakeWithPlugin() {
$this->Task->expectAt(1, 'createFile', array(
$path, new PatternExpectation('/Article extends ControllerTestAppModel/')));
$this->Task->bake('Article', array(), array());
+
+ $this->assertEqual(count(ClassRegistry::keys()), 0);
+ $this->assertEqual(count(ClassRegistry::mapKeys()), 0);
}
/**
@@ -699,6 +702,9 @@ function testExecuteWithNamedModel() {
$this->Task->setReturnValue('_checkUnitTest', 1);
$this->Task->expectAt(0, 'createFile', array($filename, new PatternExpectation('/class Article extends AppModel/')));
$this->Task->execute();
+
+ $this->assertEqual(count(ClassRegistry::keys()), 0);
+ $this->assertEqual(count(ClassRegistry::mapKeys()), 0);
}
/**
@@ -732,6 +738,9 @@ function testExecuteIntoAll() {
$this->Task->expectAt(4, 'createFile', array($filename, new PatternExpectation('/class Tag/')));
$this->Task->execute();
+
+ $this->assertEqual(count(ClassRegistry::keys()), 0);
+ $this->assertEqual(count(ClassRegistry::mapKeys()), 0);
}
/**
@@ -762,6 +771,9 @@ function testExecuteIntoInteractive() {
$this->Task->expectOnce('createFile');
$this->Task->expectAt(0, 'createFile', array($filename, new PatternExpectation('/class Article/')));
$this->Task->execute();
+
+ $this->assertEqual(count(ClassRegistry::keys()), 0);
+ $this->assertEqual(count(ClassRegistry::mapKeys()), 0);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.