--- tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php.old 2016-06-13 17:57:43.021134891 +0200 +++ tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php 2016-06-13 17:57:47.140157022 +0200 @@ -275,7 +275,8 @@ $this->_sm->dropAndCreateTable($table); - $listenerMock = $this->getMock('ListTableColumnsDispatchEventListener', array('onSchemaColumnDefinition')); + $listenerMock = $this->getMockObjectGenerator()->getMock('ListTableColumnsDispatchEventListener', array('onSchemaColumnDefinition')); + $this->registerMockObject($listenerMock); $listenerMock ->expects($this->exactly(7)) ->method('onSchemaColumnDefinition'); @@ -300,7 +301,8 @@ $this->_sm->dropAndCreateTable($table); - $listenerMock = $this->getMock('ListTableIndexesDispatchEventListener', array('onSchemaIndexDefinition')); + $listenerMock = $this->getMockObjectGenerator()->getMock('ListTableIndexesDispatchEventListener', array('onSchemaIndexDefinition')); + $this->registerMockObject($listenerMock); $listenerMock ->expects($this->exactly(3)) ->method('onSchemaIndexDefinition');