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.
This commit is contained in:
Schlaefer 2014-05-14 10:28:11 +02:00
parent 66e733f8b1
commit bf0edd1112

View file

@ -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');