mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
66e733f8b1
commit
bf0edd1112
1 changed files with 7 additions and 3 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue