File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -615,11 +615,18 @@ public function testPrefersReducedMotionDisabled(string $browser): void
615615 {
616616 $ this ->expectException (ElementClickInterceptedException::class);
617617
618+ $ previous = $ _SERVER ['PANTHER_NO_REDUCED_MOTION ' ] ?? null ;
618619 $ _SERVER ['PANTHER_NO_REDUCED_MOTION ' ] = true ;
619620 $ client = self ::createPantherClient (['browser ' => $ browser ]);
620621 $ client ->request ('GET ' , '/prefers-reduced-motion.html ' );
621622
622623 $ client ->clickLink ('Click me! ' );
624+
625+ if (null === $ previous ) {
626+ unset($ _SERVER ['PANTHER_NO_REDUCED_MOTION ' ]);
627+ } else {
628+ $ _SERVER ['PANTHER_NO_REDUCED_MOTION ' ] = $ previous ;
629+ }
623630 }
624631
625632 public static function providePrefersReducedMotion (): iterable
You can’t perform that action at this time.
0 commit comments