Skip to content

Commit

Permalink
Fixing tests for mantle 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jan 12, 2024
1 parent 83a94c6 commit 1c0981e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test-rest-api-guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}


Expand Down

0 comments on commit 1c0981e

Please sign in to comment.