diff --git a/tests/Doctrine/Tests/Mocks/ConnectionCommitFailMock.php b/tests/Doctrine/Tests/Mocks/ConnectionCommitFailMock.php deleted file mode 100644 index c31b50bf4f7..00000000000 --- a/tests/Doctrine/Tests/Mocks/ConnectionCommitFailMock.php +++ /dev/null @@ -1,22 +0,0 @@ -_connectionMock = new ConnectionCommitFailMock([], new DriverMock()); - $this->eventManager = $this->getMockBuilder(EventManager::class)->getMock(); - $this->_emMock = EntityManagerMock::create($this->_connectionMock, null, $this->eventManager); - $this->_unitOfWork = new UnitOfWorkMock($this->_emMock); - $this->_emMock->setUnitOfWork($this->_unitOfWork); + $this->_connectionMock = $this->getMockBuilder(ConnectionMock::class) + ->setConstructorArgs([[], new DriverMock()]) + ->setMethods(['commit']) + ->getMock(); + + $this->_connectionMock->method('commit')->willReturn(false); // Setup fake persister and id generator $userPersister = new EntityPersisterMock($this->_emMock, $this->_emMock->getClassMetadata(ForumUser::class));