Skip to content
Permalink
Browse files

Trying to fix occasional error during FixtureTaskTest.

  • Loading branch information...
markstory committed Sep 14, 2011
1 parent 7ba2f90 commit 4fda085928b8bad7b978c21657509fa54116a57b
Showing with 8 additions and 5 deletions.
  1. +8 −5 lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php
@@ -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();
}

0 comments on commit 4fda085

Please sign in to comment.
You can’t perform that action at this time.