@@ -55,7 +55,6 @@ public function testRegisterForm(): void
5555 $ reflection = new ReflectionClass (FormDisplay::class);
5656
5757 $ attrForms = $ reflection ->getProperty ('forms ' );
58- $ attrForms ->setAccessible (true );
5958
6059 $ array = [
6160 'Servers ' => [
@@ -71,7 +70,6 @@ public function testRegisterForm(): void
7170 $ this ->assertInstanceOf (Form::class, $ _forms ['pma_testform ' ]);
7271
7372 $ attrSystemPaths = $ reflection ->getProperty ('systemPaths ' );
74- $ attrSystemPaths ->setAccessible (true );
7573
7674 $ this ->assertEquals (
7775 [
@@ -82,7 +80,6 @@ public function testRegisterForm(): void
8280 );
8381
8482 $ attrTranslatedPaths = $ reflection ->getProperty ('translatedPaths ' );
85- $ attrTranslatedPaths ->setAccessible (true );
8683
8784 $ this ->assertEquals (
8885 [
@@ -110,7 +107,6 @@ public function testProcess(): void
110107 ->getMock ();
111108
112109 $ attrForms = new ReflectionProperty (FormDisplay::class, 'forms ' );
113- $ attrForms ->setAccessible (true );
114110 $ attrForms ->setValue ($ this ->object , [1 , 2 , 3 ]);
115111
116112 $ this ->object ->expects ($ this ->once ())
@@ -137,11 +133,9 @@ public function testDisplayErrors(): void
137133 $ reflection = new ReflectionClass (FormDisplay::class);
138134
139135 $ attrIsValidated = $ reflection ->getProperty ('isValidated ' );
140- $ attrIsValidated ->setAccessible (true );
141136 $ attrIsValidated ->setValue ($ this ->object , true );
142137
143138 $ attrIsValidated = $ reflection ->getProperty ('errors ' );
144- $ attrIsValidated ->setAccessible (true );
145139 $ attrIsValidated ->setValue ($ this ->object , []);
146140
147141 $ result = $ this ->object ->displayErrors ();
@@ -159,7 +153,6 @@ public function testDisplayErrors(): void
159153 $ sysArr = ['Servers/1/test ' => 'Servers/1/test2 ' ];
160154
161155 $ attrSystemPaths = $ reflection ->getProperty ('systemPaths ' );
162- $ attrSystemPaths ->setAccessible (true );
163156 $ attrSystemPaths ->setValue ($ this ->object , $ sysArr );
164157
165158 $ attrIsValidated ->setValue ($ this ->object , $ arr );
@@ -181,11 +174,9 @@ public function testFixErrors(): void
181174 $ reflection = new ReflectionClass (FormDisplay::class);
182175
183176 $ attrIsValidated = $ reflection ->getProperty ('isValidated ' );
184- $ attrIsValidated ->setAccessible (true );
185177 $ attrIsValidated ->setValue ($ this ->object , true );
186178
187179 $ attrIsValidated = $ reflection ->getProperty ('errors ' );
188- $ attrIsValidated ->setAccessible (true );
189180 $ attrIsValidated ->setValue ($ this ->object , []);
190181
191182 $ this ->object ->fixErrors ();
@@ -202,7 +193,6 @@ public function testFixErrors(): void
202193 $ sysArr = ['Servers/1/test ' => 'Servers/1/host ' ];
203194
204195 $ attrSystemPaths = $ reflection ->getProperty ('systemPaths ' );
205- $ attrSystemPaths ->setAccessible (true );
206196 $ attrSystemPaths ->setValue ($ this ->object , $ sysArr );
207197
208198 $ attrIsValidated ->setValue ($ this ->object , $ arr );
@@ -225,7 +215,6 @@ public function testFixErrors(): void
225215 public function testValidateSelect (): void
226216 {
227217 $ attrValidateSelect = new ReflectionMethod (FormDisplay::class, 'validateSelect ' );
228- $ attrValidateSelect ->setAccessible (true );
229218
230219 $ arr = ['foo ' => 'var ' ];
231220 $ value = 'foo ' ;
@@ -286,7 +275,6 @@ public function testValidateSelect(): void
286275 public function testHasErrors (): void
287276 {
288277 $ attrErrors = new ReflectionProperty (FormDisplay::class, 'errors ' );
289- $ attrErrors ->setAccessible (true );
290278
291279 $ this ->assertFalse (
292280 $ this ->object ->hasErrors ()
@@ -333,7 +321,6 @@ public function testGetDocLink(): void
333321 public function testGetOptName (): void
334322 {
335323 $ method = new ReflectionMethod (FormDisplay::class, 'getOptName ' );
336- $ method ->setAccessible (true );
337324
338325 $ this ->assertEquals (
339326 'Servers_ ' ,
@@ -352,11 +339,9 @@ public function testGetOptName(): void
352339 public function testLoadUserprefsInfo (): void
353340 {
354341 $ method = new ReflectionMethod (FormDisplay::class, 'loadUserprefsInfo ' );
355- $ method ->setAccessible (true );
356342
357343 $ attrUserprefs = new ReflectionProperty (FormDisplay::class, 'userprefsDisallow ' );
358344
359- $ attrUserprefs ->setAccessible (true );
360345 $ method ->invoke ($ this ->object , null );
361346 $ this ->assertEquals (
362347 [],
@@ -370,7 +355,6 @@ public function testLoadUserprefsInfo(): void
370355 public function testSetComments (): void
371356 {
372357 $ method = new ReflectionMethod (FormDisplay::class, 'setComments ' );
373- $ method ->setAccessible (true );
374358
375359 // recoding
376360 $ opts = ['values ' => []];
0 commit comments