From 5df13380468fb99e798d73d7d31a794cabe65e22 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 6 May 2013 15:42:11 -0700 Subject: [PATCH] New test for getGrantType to test for exception --- tests/authorization/AuthServerTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/authorization/AuthServerTest.php b/tests/authorization/AuthServerTest.php index 50b03147..88f928b5 100644 --- a/tests/authorization/AuthServerTest.php +++ b/tests/authorization/AuthServerTest.php @@ -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