diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-29 20:20:04 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-29 20:20:09 +0100 |
commit | 91bfff39e0ff46dc7f587333ccc63cb9e3a8b3d5 (patch) | |
tree | 62f6d724be997c26accde91bfd3f07155dc66cf6 /tests/unit/db | |
parent | 9b36078bebc10e23ddc59d60ae39e98c989e7132 (diff) |
update mappertestutiltiy
Diffstat (limited to 'tests/unit/db')
-rw-r--r-- | tests/unit/db/mappertestutility.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unit/db/mappertestutility.php b/tests/unit/db/mappertestutility.php index cc84e34ed..49e985f3b 100644 --- a/tests/unit/db/mappertestutility.php +++ b/tests/unit/db/mappertestutility.php @@ -69,7 +69,7 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase { * will be called on the result */ protected function setMapperResult($sql, $arguments=array(), $returnRows=array(), - $limit=null, $offset=null){ + $limit=null, $offset=null, $expectClose=false){ $this->iterators[] = new ArgumentIterator($returnRows); @@ -90,7 +90,12 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase { return $result; } )); - $this->pdoResult->expects($this->any()) + if ($expectClose) { + $closing = $this->once(); + } else { + $closing = $this->any(); + } + $this->pdoResult->expects($closing) ->method('closeCursor'); $index = 1; |