diff --git a/tests/php/src/MobileRedirectionTest.php b/tests/php/src/MobileRedirectionTest.php index abf21984cfd..095fe77c9f7 100644 --- a/tests/php/src/MobileRedirectionTest.php +++ b/tests/php/src/MobileRedirectionTest.php @@ -431,6 +431,7 @@ public function test_is_using_client_side_redirection() { add_filter( 'amp_dev_mode_enabled', '__return_true' ); $this->assertTrue( $this->instance->is_using_client_side_redirection() ); remove_filter( 'amp_dev_mode_enabled', '__return_true' ); + wp_set_current_user( 0 ); $this->assertFalse( $this->instance->is_using_client_side_redirection() ); global $wp_customize;