mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Trying to fix occasional error during FixtureTaskTest.
This commit is contained in:
parent
7ba2f90b2a
commit
4fda085928
1 changed files with 8 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue