@@ -300,7 +300,8 @@ public function testSelectCollectionInheritsOptions(): void
300
300
$ this ->assertSame ($ this ->getCollectionName (), $ debug ['collectionName ' ]);
301
301
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
302
302
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
303
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
303
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
304
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
304
305
$ this ->assertIsArray ($ debug ['typeMap ' ]);
305
306
$ this ->assertSame (['root ' => 'array ' ], $ debug ['typeMap ' ]);
306
307
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
@@ -321,7 +322,8 @@ public function testSelectCollectionPassesOptions(): void
321
322
322
323
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
323
324
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
324
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
325
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
326
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
325
327
$ this ->assertIsArray ($ debug ['typeMap ' ]);
326
328
$ this ->assertSame (['root ' => 'array ' ], $ debug ['typeMap ' ]);
327
329
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
@@ -346,7 +348,8 @@ public function testSelectGridFSBucketInheritsOptions(): void
346
348
$ this ->assertSame (261120 , $ debug ['chunkSizeBytes ' ]);
347
349
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
348
350
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
349
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
351
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
352
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
350
353
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
351
354
$ this ->assertSame (WriteConcern::MAJORITY , $ debug ['writeConcern ' ]->getW ());
352
355
}
@@ -370,7 +373,8 @@ public function testSelectGridFSBucketPassesOptions(): void
370
373
$ this ->assertSame (8192 , $ debug ['chunkSizeBytes ' ]);
371
374
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
372
375
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
373
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
376
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
377
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
374
378
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
375
379
$ this ->assertSame (WriteConcern::MAJORITY , $ debug ['writeConcern ' ]->getW ());
376
380
}
@@ -392,7 +396,8 @@ public function testWithOptionsInheritsOptions(): void
392
396
$ this ->assertSame ($ this ->getDatabaseName (), $ debug ['databaseName ' ]);
393
397
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
394
398
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
395
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
399
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
400
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
396
401
$ this ->assertIsArray ($ debug ['typeMap ' ]);
397
402
$ this ->assertSame (['root ' => 'array ' ], $ debug ['typeMap ' ]);
398
403
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
@@ -413,7 +418,8 @@ public function testWithOptionsPassesOptions(): void
413
418
414
419
$ this ->assertInstanceOf (ReadConcern::class, $ debug ['readConcern ' ]);
415
420
$ this ->assertSame (ReadConcern::LOCAL , $ debug ['readConcern ' ]->getLevel ());
416
- $ this ->assertEquals (new ReadPreference (ReadPreference::SECONDARY_PREFERRED ), $ debug ['readPreference ' ]);
421
+ $ this ->assertInstanceOf (ReadPreference::class, $ debug ['readPreference ' ]);
422
+ $ this ->assertSame (ReadPreference::SECONDARY_PREFERRED , $ debug ['readPreference ' ]->getMode ());
417
423
$ this ->assertIsArray ($ debug ['typeMap ' ]);
418
424
$ this ->assertSame (['root ' => 'array ' ], $ debug ['typeMap ' ]);
419
425
$ this ->assertInstanceOf (WriteConcern::class, $ debug ['writeConcern ' ]);
0 commit comments