@@ -297,15 +297,15 @@ public function testTransactionRetriesOnSerializationFailure()
297
297
public function testTransactionMethodRetriesOnDeadlock ()
298
298
{
299
299
$ this ->expectException (QueryException::class);
300
- $ this ->expectExceptionMessage ('Deadlock found when trying to get lock (SQL: ) ' );
300
+ $ this ->expectExceptionMessage ('Deadlock found when trying to get lock (Connection: conn, SQL: ) ' );
301
301
302
302
$ pdo = $ this ->getMockBuilder (DatabaseConnectionTestMockPDO::class)->onlyMethods (['beginTransaction ' , 'commit ' , 'rollBack ' ])->getMock ();
303
303
$ mock = $ this ->getMockConnection ([], $ pdo );
304
304
$ pdo ->expects ($ this ->exactly (3 ))->method ('beginTransaction ' );
305
305
$ pdo ->expects ($ this ->exactly (3 ))->method ('rollBack ' );
306
306
$ pdo ->expects ($ this ->never ())->method ('commit ' );
307
307
$ mock ->transaction (function () {
308
- throw new QueryException ('' , [], new Exception ('Deadlock found when trying to get lock ' ));
308
+ throw new QueryException ('conn ' , ' ' , [], new Exception ('Deadlock found when trying to get lock ' ));
309
309
}, 3 );
310
310
}
311
311
@@ -328,7 +328,7 @@ public function testTransactionMethodRollsbackAndThrows()
328
328
public function testOnLostConnectionPDOIsNotSwappedWithinATransaction ()
329
329
{
330
330
$ this ->expectException (QueryException::class);
331
- $ this ->expectExceptionMessage ('server has gone away (SQL: foo) ' );
331
+ $ this ->expectExceptionMessage ('server has gone away (Connection: , SQL: foo) ' );
332
332
333
333
$ pdo = m::mock (PDO ::class);
334
334
$ pdo ->shouldReceive ('beginTransaction ' )->once ();
@@ -374,14 +374,14 @@ public function testRunMethodRetriesOnFailure()
374
374
$ mock ->expects ($ this ->once ())->method ('tryAgainIfCausedByLostConnection ' );
375
375
376
376
$ method ->invokeArgs ($ mock , ['' , [], function () {
377
- throw new QueryException ('' , [], new Exception );
377
+ throw new QueryException ('' , '' , [], new Exception );
378
378
}]);
379
379
}
380
380
381
381
public function testRunMethodNeverRetriesIfWithinTransaction ()
382
382
{
383
383
$ this ->expectException (QueryException::class);
384
- $ this ->expectExceptionMessage ('(SQL: ) (SQL: ) ' );
384
+ $ this ->expectExceptionMessage ('(Connection: conn, SQL: ) (Connection: , SQL: ) ' );
385
385
386
386
$ method = (new ReflectionClass (Connection::class))->getMethod ('run ' );
387
387
$ method ->setAccessible (true );
@@ -393,7 +393,7 @@ public function testRunMethodNeverRetriesIfWithinTransaction()
393
393
$ mock ->beginTransaction ();
394
394
395
395
$ method ->invokeArgs ($ mock , ['' , [], function () {
396
- throw new QueryException ('' , [], new Exception );
396
+ throw new QueryException ('conn ' , ' ' , [], new Exception );
397
397
}]);
398
398
}
399
399
0 commit comments