1616use PHPUnit \Framework \Attributes \CoversClass ;
1717use PHPUnit \Framework \Attributes \DataProvider ;
1818use PHPUnit \Framework \Attributes \Medium ;
19- use PHPUnit \Framework \Attributes \PreserveGlobalState ;
20- use PHPUnit \Framework \Attributes \RunInSeparateProcess ;
2119use ReflectionException ;
2220use ReflectionMethod ;
2321use ReflectionProperty ;
@@ -74,8 +72,6 @@ protected function tearDown(): void
7472 unset($ this ->object );
7573 }
7674
77- #[RunInSeparateProcess]
78- #[PreserveGlobalState(false )]
7975 public function testAuthErrorAJAX (): void
8076 {
8177 $ GLOBALS ['conn_error ' ] = true ;
@@ -113,8 +109,6 @@ private function getAuthErrorMockResponse(): void
113109 ErrorHandler::$ instance = $ mockErrorHandler ;
114110 }
115111
116- #[RunInSeparateProcess]
117- #[PreserveGlobalState(false )]
118112 public function testAuthError (): void
119113 {
120114 $ _REQUEST = [];
@@ -189,8 +183,6 @@ public function testAuthError(): void
189183 self ::assertStringContainsString ('<input type="hidden" name="table" value="testTable"> ' , $ result );
190184 }
191185
192- #[RunInSeparateProcess]
193- #[PreserveGlobalState(false )]
194186 public function testAuthCaptcha (): void
195187 {
196188 $ _REQUEST ['old_usr ' ] = '' ;
@@ -251,8 +243,6 @@ public function testAuthCaptcha(): void
251243 );
252244 }
253245
254- #[RunInSeparateProcess]
255- #[PreserveGlobalState(false )]
256246 public function testAuthCaptchaCheckbox (): void
257247 {
258248 $ _REQUEST ['old_usr ' ] = '' ;
@@ -315,8 +305,6 @@ public function testAuthCaptchaCheckbox(): void
315305 );
316306 }
317307
318- #[RunInSeparateProcess]
319- #[PreserveGlobalState(false )]
320308 public function testAuthHeader (): void
321309 {
322310 $ config = Config::getInstance ();
@@ -336,8 +324,6 @@ public function testAuthHeader(): void
336324 self ::assertSame (302 , $ response ->getStatusCode ());
337325 }
338326
339- #[RunInSeparateProcess]
340- #[PreserveGlobalState(false )]
341327 public function testAuthHeaderPartial (): void
342328 {
343329 $ config = Config::getInstance ();
@@ -377,8 +363,6 @@ public function testAuthCheckCaptcha(): void
377363 self ::assertSame ('Missing Captcha verification, maybe it has been blocked by adblock? ' , $ GLOBALS ['conn_error ' ]);
378364 }
379365
380- #[RunInSeparateProcess]
381- #[PreserveGlobalState(false )]
382366 public function testLogoutDelete (): void
383367 {
384368 $ responseStub = new ResponseRendererStub ();
@@ -406,8 +390,6 @@ public function testLogoutDelete(): void
406390 self ::assertArrayNotHasKey ('pmaAuth-0 ' , $ _COOKIE );
407391 }
408392
409- #[RunInSeparateProcess]
410- #[PreserveGlobalState(false )]
411393 public function testLogout (): void
412394 {
413395 $ responseStub = new ResponseRendererStub ();
@@ -657,8 +639,6 @@ public function testAuthSetUserWithHeaders(): void
657639 $ this ->object ->rememberCredentials ();
658640 }
659641
660- #[RunInSeparateProcess]
661- #[PreserveGlobalState(false )]
662642 public function testAuthFailsNoPass (): void
663643 {
664644 $ this ->object = $ this ->getMockBuilder (AuthenticationCookie::class)
@@ -727,8 +707,6 @@ public function testAuthFailsTooLongPass(string $password, bool $expected, strin
727707 self ::assertSame ($ GLOBALS ['conn_error ' ], $ connError );
728708 }
729709
730- #[RunInSeparateProcess]
731- #[PreserveGlobalState(false )]
732710 public function testAuthFailsDeny (): void
733711 {
734712 $ this ->object = $ this ->getMockBuilder (AuthenticationCookie::class)
@@ -759,8 +737,6 @@ public function testAuthFailsDeny(): void
759737 self ::assertSame ($ GLOBALS ['conn_error ' ], 'Access denied! ' );
760738 }
761739
762- #[RunInSeparateProcess]
763- #[PreserveGlobalState(false )]
764740 public function testAuthFailsActivity (): void
765741 {
766742 $ this ->object = $ this ->getMockBuilder (AuthenticationCookie::class)
@@ -798,8 +774,6 @@ public function testAuthFailsActivity(): void
798774 );
799775 }
800776
801- #[RunInSeparateProcess]
802- #[PreserveGlobalState(false )]
803777 public function testAuthFailsDBI (): void
804778 {
805779 $ this ->object = $ this ->getMockBuilder (AuthenticationCookie::class)
@@ -841,8 +815,6 @@ public function testAuthFailsDBI(): void
841815 self ::assertSame ($ GLOBALS ['conn_error ' ], '#42 Cannot log in to the MySQL server ' );
842816 }
843817
844- #[RunInSeparateProcess]
845- #[PreserveGlobalState(false )]
846818 public function testAuthFailsErrno (): void
847819 {
848820 $ this ->object = $ this ->getMockBuilder (AuthenticationCookie::class)
@@ -1007,8 +979,6 @@ public function testAuthenticate(): void
1007979 * @param mixed[] $rules rules
1008980 * @param string $expected expected result
1009981 */
1010- #[RunInSeparateProcess]
1011- #[PreserveGlobalState(false )]
1012982 #[DataProvider('checkRulesProvider ' )]
1013983 public function testCheckRules (
1014984 string $ user ,
0 commit comments