mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Check for correct exception messages
This commit is contained in:
parent
7341d5ddc8
commit
8f20659f1d
@ -73,15 +73,20 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* @expectedException \Oauth2\Resource\OAuthResourceServerException
|
||||
* @expectedExceptionMessage An access token was not presented with the request
|
||||
*/
|
||||
function test_init_missingToken()
|
||||
{
|
||||
$this->server->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Oauth2\Resource\OAuthResourceServerException
|
||||
* @expectedExceptionMessage The access token is not registered with the resource server
|
||||
*/
|
||||
function test_init_wrongToken()
|
||||
{
|
||||
$_POST['oauth_token'] = 'test12345';
|
||||
$_POST['oauth_token'] = 'blah';
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
|
||||
$this->server->init();
|
||||
|
Loading…
Reference in New Issue
Block a user