mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
New test for getGrantType to test for exception
This commit is contained in:
parent
5d7e0d67cc
commit
5df1338046
@ -210,6 +210,16 @@ class Authorization_Server_test extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($result instanceof OAuth2\Grant\GrantTypeInterface);
|
$this->assertTrue($result instanceof OAuth2\Grant\GrantTypeInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException OAuth2\Exception\InvalidGrantTypeException
|
||||||
|
* @expectedExceptionCode 9
|
||||||
|
*/
|
||||||
|
public function test_getGrantType_fail()
|
||||||
|
{
|
||||||
|
$a = $this->returnDefault();
|
||||||
|
$a->getGrantType('blah');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException OAuth2\Exception\ClientException
|
* @expectedException OAuth2\Exception\ClientException
|
||||||
* @expectedExceptionCode 0
|
* @expectedExceptionCode 0
|
||||||
|
Loading…
Reference in New Issue
Block a user