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