Skip to content

Commit

Permalink
Simplifying test
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 21, 2013
1 parent 39be997 commit 0f2e6a1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/Cake/Test/TestCase/ORM/QueryTest.php
Expand Up @@ -990,15 +990,9 @@ public function testResultsAreWrappedInMapReduce() {
$query = $this->getMock('\Cake\ORM\Query', ['executeStatement'], $params);

$statement = $this->getMock('\Database\StatementInterface', ['fetch']);
$statement->expects($this->at(0))
$statement->expects($this->exactly(3))
->method('fetch')
->will($this->returnValue(['a' => 1]));
$statement->expects($this->at(1))
->method('fetch')
->will($this->returnValue(['a' => 2]));
$statement->expects($this->at(2))
->method('fetch')
->will($this->returnValue(false));
->will($this->onConsecutiveCalls(['a' => 1], ['a' => 2], false));

$query->expects($this->once())
->method('executeStatement')
Expand Down

0 comments on commit 0f2e6a1

Please sign in to comment.