mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
update invalid grant type test
This commit is contained in:
parent
a0402f1994
commit
ecad2b98ae
@ -33,9 +33,12 @@ class ServerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$server->enableGrantType(new ClientCredentialsGrant(), new \DateInterval('PT1M'));
|
||||
|
||||
$response = $server->respondToRequest();
|
||||
$this->assertTrue($response instanceof ResponseInterface);
|
||||
$this->assertEquals(400, $response->getStatusCode());
|
||||
try {
|
||||
$server->respondToRequest();
|
||||
} catch (OAuthServerException $e) {
|
||||
$this->assertEquals('unsupported_grant_type', $e->getErrorType());
|
||||
$this->assertEquals(400, $e->getHttpStatusCode());
|
||||
}
|
||||
}
|
||||
|
||||
public function testRespondToRequest()
|
||||
|
Loading…
Reference in New Issue
Block a user