From fb1fa71b5deaba1e370ee4c746f7595e6c5b5573 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Thu, 10 Mar 2016 16:34:21 +0000 Subject: [PATCH] Improved BearerResponseType test --- tests/ResponseTypes/BearerResponseTypeTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ResponseTypes/BearerResponseTypeTest.php b/tests/ResponseTypes/BearerResponseTypeTest.php index 8a960214..b5ca3ebb 100644 --- a/tests/ResponseTypes/BearerResponseTypeTest.php +++ b/tests/ResponseTypes/BearerResponseTypeTest.php @@ -5,6 +5,7 @@ namespace LeagueTests\ResponseTypes; use League\OAuth2\Server\Entities\AccessTokenEntity; use League\OAuth2\Server\Entities\ClientEntity; use League\OAuth2\Server\Entities\RefreshTokenEntity; +use League\OAuth2\Server\Entities\ScopeEntity; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; use League\OAuth2\Server\ResponseTypes\BearerTokenResponse; @@ -28,10 +29,14 @@ class BearerResponseTypeTest extends \PHPUnit_Framework_TestCase $client = new ClientEntity(); $client->setIdentifier('clientName'); + $scope = new ScopeEntity(); + $scope->setIdentifier('basic'); + $accessToken = new AccessTokenEntity(); $accessToken->setIdentifier('abcdef'); $accessToken->setExpiryDateTime((new \DateTime())->add(new \DateInterval('PT1H'))); $accessToken->setClient($client); + $accessToken->addScope($scope); $refreshToken = new RefreshTokenEntity(); $refreshToken->setIdentifier('abcdef');