From 13be5578253e0d549c6a76b4c2481441825e4358 Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Mon, 6 Nov 2017 22:51:11 +0000 Subject: [PATCH] Re-add the complete testCompleteAuthorizationRequestNoUser() --- tests/Grant/AuthCodeGrantTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Grant/AuthCodeGrantTest.php b/tests/Grant/AuthCodeGrantTest.php index 0e85144f..395d1ace 100644 --- a/tests/Grant/AuthCodeGrantTest.php +++ b/tests/Grant/AuthCodeGrantTest.php @@ -1655,6 +1655,20 @@ class AuthCodeGrantTest extends \PHPUnit_Framework_TestCase $this->assertTrue($response->getRefreshToken() instanceof RefreshTokenEntityInterface); } + /** + * @expectedException \LogicException + */ + public function testCompleteAuthorizationRequestNoUser() + { + $grant = new AuthCodeGrant( + $this->getMockBuilder(AuthCodeRepositoryInterface::class)->getMock(), + $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock(), + new \DateInterval('PT10M') + ); + + $grant->completeAuthorizationRequest(new AuthorizationRequest()); + } + /** * @expectedException \League\OAuth2\Server\Exception\OAuthServerException + * @expectedExceptionCode 5