From 91bfff39e0ff46dc7f587333ccc63cb9e3a8b3d5 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 29 Jan 2015 20:20:04 +0100 Subject: update mappertestutiltiy --- tests/unit/db/mappertestutility.php | 9 +++++++-- 1 file 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; -- cgit v1.2.3