mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +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'));
|
$server->enableGrantType(new ClientCredentialsGrant(), new \DateInterval('PT1M'));
|
||||||
|
|
||||||
$response = $server->respondToRequest();
|
try {
|
||||||
$this->assertTrue($response instanceof ResponseInterface);
|
$server->respondToRequest();
|
||||||
$this->assertEquals(400, $response->getStatusCode());
|
} catch (OAuthServerException $e) {
|
||||||
|
$this->assertEquals('unsupported_grant_type', $e->getErrorType());
|
||||||
|
$this->assertEquals(400, $e->getHttpStatusCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRespondToRequest()
|
public function testRespondToRequest()
|
||||||
|
Loading…
Reference in New Issue
Block a user