|
|
@@ -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();
|
|
|
}
|