From bf0edd111245789f80783d4cfc51fb7f27d1270b Mon Sep 17 00:00:00 2001 From: Schlaefer Date: Wed, 14 May 2014 10:28:11 +0200 Subject: [PATCH] fixes failing test cases in ModelTaskTest if not run in test-suite Tests 'testSkipTablesAndAll' and 'testExecuteIntoAll' didn't took fixture table 'core.number_tree' into account. --- .../Test/Case/Console/Command/Task/ModelTaskTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php index c16cc1e20..a6b57dbd2 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php @@ -1052,8 +1052,8 @@ TEXT; $this->Task->args = array('all'); $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(true)); - $this->Task->Fixture->expects($this->exactly(5))->method('bake'); - $this->Task->Test->expects($this->exactly(5))->method('bake'); + $this->Task->Fixture->expects($this->exactly(6))->method('bake'); + $this->Task->Test->expects($this->exactly(6))->method('bake'); $filename = '/my/path/BakeArticle.php'; $this->Task->expects($this->at(1))->method('createFile') @@ -1083,6 +1083,10 @@ TEXT; $this->Task->expects($this->at(5))->method('createFile') ->with($filename, $this->stringContains('class CategoryThread')); + $filename = '/my/path/NumberTree.php'; + $this->Task->expects($this->at(6))->method('createFile') + ->with($filename, $this->stringContains('class NumberTree')); + $this->Task->execute(); $this->assertEquals(count(ClassRegistry::keys()), 0); @@ -1216,7 +1220,7 @@ TEXT; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(true)); - $this->Task->skipTables = array('bake_tags'); + $this->Task->skipTables = array('bake_tags', 'number_trees'); $this->Task->Fixture->expects($this->exactly(4))->method('bake'); $this->Task->Test->expects($this->exactly(4))->method('bake');