@@ -638,7 +638,6 @@ public function testExecuteInsertsRespectsWriteConcern(string $class, string|int
638
638
->with ($ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
639
639
640
640
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
641
- $ reflectionProperty ->setAccessible (true );
642
641
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
643
642
644
643
$ testDocument = new $ class ();
@@ -660,7 +659,6 @@ public function testExecuteInsertsOmitsWriteConcernInTransaction(string $class,
660
659
->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
661
660
662
661
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
663
- $ reflectionProperty ->setAccessible (true );
664
662
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
665
663
666
664
$ testDocument = new $ class ();
@@ -682,7 +680,6 @@ public function testExecuteUpsertsRespectsWriteConcern(string $class, string|int
682
680
->with ($ this ->isType ('array ' ), $ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
683
681
684
682
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
685
- $ reflectionProperty ->setAccessible (true );
686
683
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
687
684
688
685
$ testDocument = new $ class ();
@@ -705,7 +702,6 @@ public function testExecuteUpsertsDoesNotUseWriteConcernInTransaction(string $cl
705
702
->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
706
703
707
704
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
708
- $ reflectionProperty ->setAccessible (true );
709
705
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
710
706
711
707
$ testDocument = new $ class ();
@@ -728,7 +724,6 @@ public function testRemoveRespectsWriteConcern(string $class, string|int $writeC
728
724
->with ($ this ->isType ('array ' ), $ this ->logicalAnd ($ this ->arrayHasKey ('writeConcern ' ), $ this ->containsEqual (new WriteConcern ($ writeConcern ))));
729
725
730
726
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
731
- $ reflectionProperty ->setAccessible (true );
732
727
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
733
728
734
729
$ testDocument = new $ class ();
@@ -753,7 +748,6 @@ public function testRemoveDoesNotUseWriteConcernInTransaction(string $class, str
753
748
->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
754
749
755
750
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
756
- $ reflectionProperty ->setAccessible (true );
757
751
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
758
752
759
753
$ testDocument = new $ class ();
@@ -777,7 +771,6 @@ public function testDefaultWriteConcernIsRespected(): void
777
771
->with ($ this ->isType ('array ' ), $ this ->equalTo (['writeConcern ' => new WriteConcern (0 )]));
778
772
779
773
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
780
- $ reflectionProperty ->setAccessible (true );
781
774
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
782
775
783
776
$ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['writeConcern ' => new WriteConcern (0 )]);
@@ -800,7 +793,6 @@ public function testDefaultWriteConcernIsIgnoredInTransaction(): void
800
793
->with ($ this ->isType ('array ' ), $ this ->logicalNot ($ this ->arrayHasKey ('writeConcern ' )));
801
794
802
795
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
803
- $ reflectionProperty ->setAccessible (true );
804
796
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
805
797
806
798
$ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['writeConcern ' => new WriteConcern (1 )]);
@@ -823,7 +815,6 @@ public function testDefaultWriteConcernIsRespectedBackwardCompatibility(): void
823
815
->with ($ this ->isType ('array ' ), $ this ->equalTo (['writeConcern ' => new WriteConcern (0 )]));
824
816
825
817
$ reflectionProperty = new ReflectionProperty ($ documentPersister , 'collection ' );
826
- $ reflectionProperty ->setAccessible (true );
827
818
$ reflectionProperty ->setValue ($ documentPersister , $ collection );
828
819
829
820
$ this ->dm ->getConfiguration ()->setDefaultCommitOptions (['w ' => 0 ]);
0 commit comments