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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -243,16 +243,19 @@ public function testExecuteIntoAll() {
$this->Task->connection = 'test'; $this->Task->connection = 'test';
$this->Task->path = '/my/path/'; $this->Task->path = '/my/path/';
$this->Task->args = array('all'); $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'))); ->will($this->returnValue(array('articles', 'comments')));


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


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


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

0 comments on commit 4fda085

Please sign in to comment.