From 4fda085928b8bad7b978c21657509fa54116a57b Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 13 Sep 2011 20:45:45 -0400 Subject: [PATCH] Trying to fix occasional error during FixtureTaskTest. --- .../Case/Console/Command/Task/FixtureTaskTest.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php index 818d75a2a..8d7ed887e 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php @@ -243,16 +243,19 @@ class FixtureTaskTest extends CakeTestCase { $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(); }