fix mappertestutility

This commit is contained in:
Bernhard Posselt 2015-02-24 17:03:56 +01:00 committed by Thomas Müller
parent 7b2fdbfb0b
commit aaf753bc9a
1 changed files with 105 additions and 101 deletions

View File

@ -57,6 +57,7 @@ abstract class MapperTestUtility extends \Test\TestCase {
}
/**
* Create mocks and set expected results for database queries
* @param string $sql the sql query that you expect to receive
@ -145,13 +146,16 @@ abstract class MapperTestUtility extends \Test\TestCase {
}
$this->query->expects($this->at($this->queryAt))
->method('execute');
->method('execute')
->will($this->returnCallback(function($sql, $p=null, $o=null, $s=null) {
}));
$this->queryAt++;
if ($expectClose) {
$closing = $this->once();
$closing = $this->at($this->queryAt);
} else {
$closing = $this->any();
}