Skip to content

Commit

Permalink
Trying to fix occasional error during FixtureTaskTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 14, 2011
1 parent 7ba2f90 commit 4fda085
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php
Expand Up @@ -243,16 +243,19 @@ public function testExecuteIntoAll() {
$this->Task->connection = 'test';
$this->Task->path = '/my/path/';
$this->Task->args = array('all');
$this->Task->Model->expects($this->any())->method('listAll')
$this->Task->Model->expects($this->any())
->method('listAll')
->will($this->returnValue(array('articles', 'comments')));

$filename = '/my/path/ArticleFixture.php';
$this->Task->expects($this->at(0))->method('createFile')
->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class ArticleFixture/'));
$this->Task->expects($this->at(0))
->method('createFile')
->with($filename, $this->stringContains('class ArticleFixture'));

$filename = '/my/path/CommentFixture.php';
$this->Task->expects($this->at(1))->method('createFile')
->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class CommentFixture/'));
$this->Task->expects($this->at(1))
->method('createFile')
->with($filename, $this->stringContains('class CommentFixture'));

$this->Task->execute();
}
Expand Down

0 comments on commit 4fda085

Please sign in to comment.