Skip to content

Commit

Permalink
Add test for parsed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisDN committed May 4, 2021
1 parent 9ccc922 commit 7bd8996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/AuthorizationValidators/BearerTokenValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public function testBearerTokenValidatorAcceptsValidToken()
$validRequest = $bearerTokenValidator->validateAuthorization($request);

$this->assertArrayHasKey('authorization', $validRequest->getHeaders());

$this->assertEquals('token-id', $validRequest->getAttribute('oauth_access_token_id'));
$this->assertEquals('client-id', $validRequest->getAttribute('oauth_client_id'));
$this->assertEquals('user-id', $validRequest->getAttribute('oauth_user_id'));
$this->assertEquals('scope1 scope2 scope3 scope4', $validRequest->getAttribute('oauth_scopes'));
}

public function testBearerTokenValidatorRejectsExpiredToken()
Expand Down

0 comments on commit 7bd8996

Please sign in to comment.