New test for getGrantType to test for exception

This commit is contained in:
Alex Bilbie 2013-05-06 15:42:11 -07:00
parent 5d7e0d67cc
commit 5df1338046

View File

@ -210,6 +210,16 @@ class Authorization_Server_test extends PHPUnit_Framework_TestCase
$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
* @expectedExceptionCode 0