Updated tests

This commit is contained in:
Alex Bilbie
2014-07-11 18:19:10 +01:00
parent 48dea185d8
commit c6bc1b0cfc
13 changed files with 115 additions and 101 deletions

View File

@@ -39,10 +39,10 @@ class RefreshTokenTest extends \PHPUnit_Framework_TestCase
$accessTokenStorage = M::mock('League\OAuth2\Server\Storage\AccessTokenInterface');
$accessTokenStorage->shouldReceive('setServer');
$accessTokenStorage->shouldReceive('getByRefreshToken')->andReturn(
(new AccessTokenEntity($server))->setToken('foobar')
(new AccessTokenEntity($server))->setId('foobar')
);
$accessTokenStorage->shouldReceive('getScopes')->andReturn([
(new ScopeEntity($server))->setId('foo')
(new ScopeEntity($server))->hydrate(['id' => 'foo'])
]);
$server->shouldReceive('getStorage')->with('access_token')->andReturn($accessTokenStorage);