Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-mabe committed May 31, 2021
1 parent 96b76ef commit 3e31fe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tests/Exception/OAuthServerExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,11 @@ public function testCanGetRedirectionUri()

$this->assertSame('https://example.com/error', $exceptionWithRedirect->getRedirectUri());
}

public function testInvalidCredentialsIsInvalidGrant()
{
$exception = OAuthServerException::invalidCredentials();

$this->assertSame('invalid_grant', $exception->getErrorType());
}
}
2 changes: 1 addition & 1 deletion tests/Grant/PasswordGrantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function testRespondToRequestBadCredentials()
$responseType = new StubResponseType();

$this->expectException(\League\OAuth2\Server\Exception\OAuthServerException::class);
$this->expectExceptionCode(10);
$this->expectExceptionCode(6);

$grant->respondToAccessTokenRequest($serverRequest, $responseType, new DateInterval('PT5M'));
}
Expand Down

0 comments on commit 3e31fe9

Please sign in to comment.