With help of ocramius
I found that the concrete methods of abstract classes do not get mocked out by default. One needs to specify the concrete methods that need to be mocked in getMockForAbstractClass
.
private function getMockedAbstractClass($className, array $methods)
{
return $this->getMockForAbstractClass(
$className,
array(),
'',
true,
true,
true,
$methods
);
}
Using the mock builder interface for this is somewhat nicer:
$platform = $this->getMockBuilder($className)
->setMethods($methods)
->getMockForAbstractClass();
The full solution can be seen here: https://github.com/doctrine/dbal/pull/586/files