From b694cca74317a220a9123e298a4f3ffb578c8e49 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 12 Jul 2014 08:58:18 +0100 Subject: [PATCH] Fix broken test --- src/Entity/AbstractTokenEntity.php | 2 +- tests/ResourceServerTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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)