diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-02-15 17:01:00 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-02-15 17:01:00 +0100 |
commit | 0368e1e3ce51647869a00cd08871a7baf29de19f (patch) | |
tree | f9ccab09df14378490a7f6979fef490a1e72c31a /tests/unit/db/mappertestutility.php | |
parent | bec3f917c331a17841da9aac7dad510707b24492 (diff) |
When passing a negative batchSizes to the item API, all items will be returned
Diffstat (limited to 'tests/unit/db/mappertestutility.php')
-rw-r--r-- | tests/unit/db/mappertestutility.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/db/mappertestutility.php b/tests/unit/db/mappertestutility.php index 49e985f3b..278cbc475 100644 --- a/tests/unit/db/mappertestutility.php +++ b/tests/unit/db/mappertestutility.php @@ -68,7 +68,7 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase { * of the database query. If not provided, it wont be assumed that fetch * will be called on the result */ - protected function setMapperResult($sql, $arguments=array(), $returnRows=array(), + protected function setMapperResult($sql, $arguments=[], $returnRows=[], $limit=null, $offset=null, $expectClose=false){ $this->iterators[] = new ArgumentIterator($returnRows); @@ -135,12 +135,16 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase { if($limit === null && $offset === null) { $this->db->expects($this->at($this->prepareAt)) ->method('prepareQuery') - ->with($this->equalTo($sql)) + ->with($this->equalTo($sql), + $this->equalTo(null), + $this->equalTo(null)) ->will(($this->returnValue($this->query))); } elseif($limit !== null && $offset === null) { $this->db->expects($this->at($this->prepareAt)) ->method('prepareQuery') - ->with($this->equalTo($sql), $this->equalTo($limit)) + ->with($this->equalTo($sql), + $this->equalTo($limit), + $this->equalTo(null)) ->will(($this->returnValue($this->query))); } elseif($limit === null && $offset !== null) { $this->db->expects($this->at($this->prepareAt)) |