diff --git a/tests/test-rest-api-guard.php b/tests/test-rest-api-guard.php index 2dc10c8..b2b4a9f 100644 --- a/tests/test-rest-api-guard.php +++ b/tests/test-rest-api-guard.php @@ -217,14 +217,14 @@ public function test_prevent_access_denylist_priority() { * @dataProvider jwtDataProvider */ public function test_jwt_authentication( $type, $token ) { - add_filter( 'rest_api_guard_authentication_jwt', fn () => true ); + $this->expectApplied( 'rest_api_guard_authentication_jwt' ); - $this->expectApplied( 'rest_api_guard_authentication_jwt' )->andReturnTrue(); + add_filter( 'rest_api_guard_authentication_jwt', fn () => true ); if ( 'valid' === $type ) { - $this->expectApplied( 'rest_api_guard_jwt_issuer' )->andReturnString(); - $this->expectApplied( 'rest_api_guard_jwt_audience' )->andReturnString(); - $this->expectApplied( 'rest_api_guard_jwt_secret' )->andReturnString(); + $this->expectApplied( 'rest_api_guard_jwt_issuer' ); + $this->expectApplied( 'rest_api_guard_jwt_audience' ); + $this->expectApplied( 'rest_api_guard_jwt_secret' ); }