update invalid grant type test

This commit is contained in:
Julián Gutiérrez 2016-03-11 00:23:29 +01:00
parent a0402f1994
commit ecad2b98ae

View File

@ -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()