@@ -638,7 +638,6 @@ public function testExecuteInsertsRespectsWriteConcern(string $class, string|int
638638 ->with ($ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
639639
640640 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
641- $ reflectionProperty ->setAccessible (true );
642641 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
643642
644643 $ testDocument = new $ class ();
@@ -660,7 +659,6 @@ public function testExecuteInsertsOmitsWriteConcernInTransaction(string $class,
660659 ->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
661660
662661 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
663- $ reflectionProperty ->setAccessible (true );
664662 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
665663
666664 $ testDocument = new $ class ();
@@ -682,7 +680,6 @@ public function testExecuteUpsertsRespectsWriteConcern(string $class, string|int
682680 ->with ($ this ->isType ('array ' ), $ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
683681
684682 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
685- $ reflectionProperty ->setAccessible (true );
686683 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
687684
688685 $ testDocument = new $ class ();
@@ -705,7 +702,6 @@ public function testExecuteUpsertsDoesNotUseWriteConcernInTransaction(string $cl
705702 ->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
706703
707704 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
708- $ reflectionProperty ->setAccessible (true );
709705 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
710706
711707 $ testDocument = new $ class ();
@@ -728,7 +724,6 @@ public function testRemoveRespectsWriteConcern(string $class, string|int $writeC
728724 ->with ($ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
729725
730726 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
731- $ reflectionProperty ->setAccessible (true );
732727 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
733728
734729 $ testDocument = new $ class ();
@@ -753,7 +748,6 @@ public function testRemoveDoesNotUseWriteConcernInTransaction(string $class, str
753748 ->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
754749
755750 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
756- $ reflectionProperty ->setAccessible (true );
757751 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
758752
759753 $ testDocument = new $ class ();
@@ -777,7 +771,6 @@ public function testDefaultWriteConcernIsRespected(): void
777771 ->with ($ this ->isType ('array ' ), $ this ->equalTo (['writeConcern ' => new WriteConcern (0 )]));
778772
779773 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
780- $ reflectionProperty ->setAccessible (true );
781774 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
782775
783776 $ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['writeConcern ' => new WriteConcern (0 )]);
@@ -800,7 +793,6 @@ public function testDefaultWriteConcernIsIgnoredInTransaction(): void
800793 ->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
801794
802795 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
803- $ reflectionProperty ->setAccessible (true );
804796 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
805797
806798 $ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['writeConcern ' => new WriteConcern (1 )]);
@@ -823,7 +815,6 @@ public function testDefaultWriteConcernIsRespectedBackwardCompatibility(): void
823815 ->with ($ this ->isType ('array ' ), $ this ->equalTo (['writeConcern ' => new WriteConcern (0 )]));
824816
825817 $ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
826- $ reflectionProperty ->setAccessible (true );
827818 $ reflectionProperty ->setValue ($ documentPersister , $ collection );
828819
829820 $ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['w ' => 0 ]);
0 commit comments