@@ -39,7 +39,6 @@ public function testSetOptionsCorrectlySetsProperties()
3939
4040 foreach ($ expected as $ key => $ value ) {
4141 $ reflProp = new \ReflectionProperty (Native::class, $ key );
42- $ reflProp ->setAccessible (true );
4342 $ this ->assertEquals ($ value , $ reflProp ->getValue ($ this ->adapter ));
4443 }
4544 }
@@ -56,7 +55,6 @@ public function testSetOptionsIgnoresPropertiesWithoutSetters()
5655
5756 foreach ($ expected as $ key => $ value ) {
5857 $ reflProp = new \ReflectionProperty (Native::class, $ key );
59- $ reflProp ->setAccessible (true );
6058 $ this ->assertNotEquals ($ value , $ reflProp ->getValue ($ this ->adapter ));
6159 }
6260 }
@@ -76,7 +74,6 @@ public function testConstructorSetsOptions()
7674
7775 foreach ($ expected as $ key => $ value ) {
7876 $ reflProp = new \ReflectionProperty (Native::class, $ key );
79- $ reflProp ->setAccessible (true );
8077 $ this ->assertEquals ($ value , $ reflProp ->getValue ($ adapter ));
8178 }
8279 }
@@ -100,7 +97,6 @@ public function testSetMapperCorrectlySetsInProperty()
10097 $ this ->adapter ->setMapper ($ mapper );
10198
10299 $ reflProp = new \ReflectionProperty (AbstractAdapter::class, 'mapper ' );
103- $ reflProp ->setAccessible (true );
104100 $ this ->assertSame ($ mapper , $ reflProp ->getValue ($ this ->adapter ));
105101 }
106102
@@ -111,7 +107,6 @@ public function testGetMapperCorrectlyReturnsFromProperty()
111107 {
112108 $ mapper = new \PHPExif \Mapper \Native ();
113109 $ reflProp = new \ReflectionProperty (AbstractAdapter::class, 'mapper ' );
114- $ reflProp ->setAccessible (true );
115110 $ reflProp ->setValue ($ this ->adapter , $ mapper );
116111 $ this ->assertSame ($ mapper , $ this ->adapter ->getMapper ());
117112 }
@@ -127,7 +122,6 @@ public function testGetMapperLazyLoadsMapperWhenNotPresent()
127122 );
128123
129124 $ mapperClass = '\\PHPExif \\Mapper \\Native ' ;
130- $ reflProp ->setAccessible (true );
131125 $ reflProp ->setValue ($ this ->adapter , $ mapperClass );
132126
133127 $ this ->assertInstanceOf ($ mapperClass , $ this ->adapter ->getMapper ());
@@ -144,14 +138,12 @@ public function testGetMapperLazyLoadingSetsInProperty()
144138 );
145139
146140 $ mapperClass = '\\PHPExif \\Mapper \\Native ' ;
147- $ reflProp ->setAccessible (true );
148141 $ reflProp ->setValue ($ this ->adapter , $ mapperClass );
149142
150143 $ reflProp2 = new \ReflectionProperty (
151144 get_class ($ this ->adapter ),
152145 'mapper '
153146 );
154- $ reflProp2 ->setAccessible (true );
155147 $ this ->adapter ->getMapper ();
156148 $ this ->assertInstanceOf ($ mapperClass , $ reflProp2 ->getValue ($ this ->adapter ));
157149 }
@@ -175,7 +167,6 @@ public function testSetHydratorCorrectlySetsInProperty()
175167 $ this ->adapter ->setHydrator ($ hydrator );
176168
177169 $ reflProp = new \ReflectionProperty (AbstractAdapter::class, 'hydrator ' );
178- $ reflProp ->setAccessible (true );
179170 $ this ->assertSame ($ hydrator , $ reflProp ->getValue ($ this ->adapter ));
180171 }
181172
@@ -186,7 +177,6 @@ public function testGetHydratorCorrectlyReturnsFromProperty()
186177 {
187178 $ hydrator = new \PHPExif \Hydrator \Mutator ();
188179 $ reflProp = new \ReflectionProperty (AbstractAdapter::class, 'hydrator ' );
189- $ reflProp ->setAccessible (true );
190180 $ reflProp ->setValue ($ this ->adapter , $ hydrator );
191181 $ this ->assertSame ($ hydrator , $ this ->adapter ->getHydrator ());
192182 }
@@ -211,7 +201,6 @@ public function testGetHydratorLazyLoadingSetsInProperty()
211201 get_class ($ this ->adapter ),
212202 'hydrator '
213203 );
214- $ reflProp ->setAccessible (true );
215204 $ this ->adapter ->getHydrator ();
216205 $ this ->assertInstanceOf ($ hydratorClass , $ reflProp ->getValue ($ this ->adapter ));
217206 }
0 commit comments