Skip to content

Commit 70249ef

Browse files
committed
Fix failing test
1 parent 59dca48 commit 70249ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/Database/DatabaseConnectionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,9 @@ public function testTransactionRetriesOnSerializationFailure()
259259

260260
$pdo = $this->getMockBuilder(DatabaseConnectionTestMockPDO::class)->setMethods(['beginTransaction', 'commit', 'rollBack'])->getMock();
261261
$mock = $this->getMockConnection([], $pdo);
262-
$pdo->method('commit')->will($this->throwException(new DatabaseConnectionTestMockPDOException('Serialization failure', '40001')));
262+
$pdo->expects($this->exactly(3))->method('commit')->will($this->throwException(new DatabaseConnectionTestMockPDOException('Serialization failure', '40001')));
263263
$pdo->expects($this->exactly(3))->method('beginTransaction');
264264
$pdo->expects($this->never())->method('rollBack');
265-
$pdo->expects($this->exactly(3))->method('commit');
266265
$mock->transaction(function () {
267266
}, 3);
268267
}

0 commit comments

Comments
 (0)