From 2b76e2bf6ef3dcddb479982b54308859009d27cb Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Thu, 24 Mar 2016 10:07:09 +0000 Subject: [PATCH] Fix for broken test which wasn't actually broken but was --- tests/Grant/ImplicitGrantTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/Grant/ImplicitGrantTest.php b/tests/Grant/ImplicitGrantTest.php index 680b55ac..06525b9c 100644 --- a/tests/Grant/ImplicitGrantTest.php +++ b/tests/Grant/ImplicitGrantTest.php @@ -9,6 +9,7 @@ use League\OAuth2\Server\Repositories\ClientRepositoryInterface; use League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use League\OAuth2\Server\Repositories\UserRepositoryInterface; use League\OAuth2\Server\ResponseTypes\HtmlResponse; +use League\OAuth2\Server\ResponseTypes\RedirectResponse; use LeagueTests\Stubs\ClientEntity; use LeagueTests\Stubs\CryptTraitStub; use LeagueTests\Stubs\StubResponseType; @@ -55,10 +56,6 @@ class ImplicitGrantTest extends \PHPUnit_Framework_TestCase $this->assertTrue($grant->canRespondToRequest($request)); } - /** - * @expectedException \League\OAuth2\Server\Exception\OAuthServerException - * @expectedExceptionCode 9 - */ public function testRespondToAuthorizationRequest() { $client = new ClientEntity(); @@ -106,7 +103,9 @@ class ImplicitGrantTest extends \PHPUnit_Framework_TestCase ] ); - $grant->respondToRequest($request, new StubResponseType(), new \DateInterval('PT10M')); + $response = $grant->respondToRequest($request, new StubResponseType(), new \DateInterval('PT10M')); + + $this->assertTrue($response instanceof RedirectResponse); } /**