Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/phpunit/unit/Mocks/DoctrineMockBuilder.php
@@ -84,9 +84,11 @@ public function getQueryBuilderMock($connection)
}

/**
* @param mixed $returnValue
*
* @return \Doctrine\DBAL\Driver\Statement|\PHPUnit_Framework_MockObject_MockObject
*/
public function getStatementMock()
public function getStatementMock($returnValue = 1)
{
$mock = $this->getAbstractMock(
'Bolt\Tests\Mocks\DoctrineDbalStatementInterface', // In case you run PHPUnit <= 3.7, use 'Mocks\DoctrineDbalStatementInterface' instead.
@@ -100,7 +102,7 @@ public function getStatementMock()

$mock->expects($this->any())
->method('fetchColumn')
->will($this->returnValue(1));
->will($this->returnValue($returnValue));

return $mock;
}