mirror of
https://github.com/elyby/oauth2-server.git
synced 2026-12-02 20:23:15 +05:30
100% test coverage
This commit is contained in:
1 parent
f24d1be3e9
commit
9af1d2a201
4 files changed
+65
-5
No files matched your search
@@ -74,7 +74,7 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase
|
||||
$accessTokenStorage->shouldReceive('getScopes')->andReturn(
|
||||
[]
|
||||
);
|
||||
$accessTokenStorage->shouldReceive('setServer');
|
||||
$accessTokenStorage''>shouldReceive('setServer');
|
||||
|
||||
$server->setAccessTokenStorage($accessTokenStorage);
|
||||
|
||||
@@ -103,4 +103,14 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($result['scope1'] instanceof ScopeEntity);
|
||||
$this->assertTrue($result['scope2'] instanceof ScopeEntity);
|
||||
}
|
||||
|
||||
public function test__toString()
|
||||
{
|
||||
$server = M::mock('League\OAuth2\Server\AbstractServer');
|
||||
|
||||
$entity = new StubAbstractTokenEntity($server);
|
||||
$this->assertEquals('', (string) $entity);
|
||||
$entity->setToken('foobar');
|
||||
$this->assertEquals('foobar', (string) $entity);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user