Skip to content
Permalink
Browse files

Updating tests to reflect changes in bake templates.

  • Loading branch information...
markstory committed Nov 13, 2010
1 parent 01894b3 commit faa23e8d510e3eecc7b698120c0588e77cd8c66a
@@ -344,8 +344,8 @@ public function testBakeActionsUsingSessions() {
$this->assertContains("\$this->set('bakeArticle', \$this->BakeArticle->read(null, \$id)", $result);
$this->assertContains('function add()', $result);
$this->assertContains('if (!empty($this->data))', $result);
$this->assertContains('if ($this->BakeArticle->save($this->data))', $result);
$this->assertContains("if (\$this->request->is('post'))", $result);
$this->assertContains('if ($this->BakeArticle->save($this->request->data))', $result);
$this->assertContains("\$this->Session->setFlash(__('The bake article has been saved'));", $result);
$this->assertContains('function edit($id = null)', $result);
@@ -386,8 +386,8 @@ public function testBakeActionsWithNoSessions() {
$this->assertContains("\$this->set('bakeArticle', \$this->BakeArticle->read(null, \$id)", $result);
$this->assertContains('function add()', $result);
$this->assertContains('if (!empty($this->data))', $result);
$this->assertContains('if ($this->BakeArticle->save($this->data))', $result);
$this->assertContains("if (\$this->request->is('post'))", $result);
$this->assertContains('if ($this->BakeArticle->save($this->request->data))', $result);
$this->assertContains("\$this->flash(__('The bake article has been saved.'), array('action' => 'index'))", $result);
@@ -363,7 +363,7 @@ public function testRegistryClearWhenBuildingTestObjects() {
));
$keys = ClassRegistry::keys();
$this->assertTrue(in_array('test_task_comment', $keys));
$object =& $this->Task->buildTestSubject('Model', 'TestTaskComment');
$object = $this->Task->buildTestSubject('Model', 'TestTaskComment');
$keys = ClassRegistry::keys();
$this->assertFalse(in_array('random', $keys));
@@ -444,7 +444,7 @@ public function testBakeModelTest() {
$this->assertContains('class TestTaskArticleTestCase extends CakeTestCase', $result);
$this->assertContains('function startTest()', $result);
$this->assertContains("\$this->TestTaskArticle =& ClassRegistry::init('TestTaskArticle')", $result);
$this->assertContains("\$this->TestTaskArticle = ClassRegistry::init('TestTaskArticle')", $result);
$this->assertContains('function endTest()', $result);
$this->assertContains('unset($this->TestTaskArticle)', $result);

0 comments on commit faa23e8

Please sign in to comment.
You can’t perform that action at this time.