@@ -275,7 +275,7 @@ private function assertCommandStartedEvent(CommandStartedEvent $actual, stdClass
275
275
276
276
private function assertCommandSucceededEvent (CommandSucceededEvent $ actual , stdClass $ expected , string $ message ): void
277
277
{
278
- Util::assertHasOnlyKeys ($ expected , ['reply ' , 'commandName ' , 'hasServiceId ' , 'hasServerConnectionId ' ]);
278
+ Util::assertHasOnlyKeys ($ expected , ['reply ' , 'commandName ' , 'databaseName ' , ' hasServiceId ' , 'hasServerConnectionId ' ]);
279
279
280
280
if (isset ($ expected ->reply )) {
281
281
assertIsObject ($ expected ->reply );
@@ -288,6 +288,11 @@ private function assertCommandSucceededEvent(CommandSucceededEvent $actual, stdC
288
288
assertSame ($ actual ->getCommandName (), $ expected ->commandName , $ message . ': commandName matches ' );
289
289
}
290
290
291
+ if (isset ($ expected ->databaseName )) {
292
+ assertIsString ($ expected ->databaseName );
293
+ assertSame ($ actual ->getDatabaseName (), $ expected ->databaseName , $ message . ': databaseName matches ' );
294
+ }
295
+
291
296
if (isset ($ expected ->hasServiceId )) {
292
297
assertIsBool ($ expected ->hasServiceId );
293
298
assertSame ($ actual ->getServiceId () !== null , $ expected ->hasServiceId , $ message . ': hasServiceId matches ' );
@@ -301,13 +306,18 @@ private function assertCommandSucceededEvent(CommandSucceededEvent $actual, stdC
301
306
302
307
private function assertCommandFailedEvent (CommandFailedEvent $ actual , stdClass $ expected , string $ message ): void
303
308
{
304
- Util::assertHasOnlyKeys ($ expected , ['commandName ' , 'hasServiceId ' , 'hasServerConnectionId ' ]);
309
+ Util::assertHasOnlyKeys ($ expected , ['commandName ' , 'databaseName ' , ' hasServiceId ' , 'hasServerConnectionId ' ]);
305
310
306
311
if (isset ($ expected ->commandName )) {
307
312
assertIsString ($ expected ->commandName );
308
313
assertSame ($ actual ->getCommandName (), $ expected ->commandName , $ message . ': commandName matches ' );
309
314
}
310
315
316
+ if (isset ($ expected ->databaseName )) {
317
+ assertIsString ($ expected ->databaseName );
318
+ assertSame ($ actual ->getDatabaseName (), $ expected ->databaseName , $ message . ': databaseName matches ' );
319
+ }
320
+
311
321
if (isset ($ expected ->hasServiceId )) {
312
322
assertIsBool ($ expected ->hasServiceId );
313
323
assertSame ($ actual ->getServiceId () !== null , $ expected ->hasServiceId , $ message . ': hasServiceId matches ' );
0 commit comments