diff --git a/src/Entity/AbstractTokenEntity.php b/src/Entity/AbstractTokenEntity.php index a8848881..4712f68d 100644 --- a/src/Entity/AbstractTokenEntity.php +++ b/src/Entity/AbstractTokenEntity.php @@ -36,7 +36,7 @@ abstract class AbstractTokenEntity * Session scopes * @var array Array of ScopeEntity */ - protected $scopes = []; + protected $scopes; /** * Token expire time diff --git a/tests/ResourceServerTest.php b/tests/ResourceServerTest.php index e485cf24..7eb957f8 100644 --- a/tests/ResourceServerTest.php +++ b/tests/ResourceServerTest.php @@ -141,10 +141,10 @@ class ResourceServerTest extends \PHPUnit_Framework_TestCase (new AccessTokenEntity($server))->setId('abcdef') ); - // $accessTokenStorage->shouldReceive('getScopes')->andReturn([ - // (new ScopeEntity($server))->hydrate(['id' => 'foo']), - // (new ScopeEntity($server))->hydrate(['id' => 'bar']) - // ]); + $accessTokenStorage->shouldReceive('getScopes')->andReturn([ + (new ScopeEntity($server))->hydrate(['id' => 'foo']), + (new ScopeEntity($server))->hydrate(['id' => 'bar']) + ]); $sessionStorage->shouldReceive('getByAccessToken')->andReturn( (new SessionEntity($server))->setId('foobar')->setOwner('user', 123)