mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
24 lines
676 B
PHP
24 lines
676 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Storage;
|
|
|
|
use League\OAuth2\Server\Storage\Adapter;
|
|
use LeagueTests\Stubs\StubAbstractServer;
|
|
use \Mockery as M;
|
|
|
|
class AdapterTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
function testSetGet()
|
|
{
|
|
$adapter = new Adapter;
|
|
|
|
$reflector = new \ReflectionClass($adapter);
|
|
$setMethod = $reflector->getMethod('setServer');
|
|
$setMethod->setAccessible(true);
|
|
$setMethod->invokeArgs($adapter, [new StubAbstractServer]);
|
|
$getMethod = $reflector->getMethod('getServer');
|
|
$getMethod->setAccessible(true);
|
|
|
|
$this->assertTrue($getMethod->invoke($adapter) instanceof StubAbstractServer);
|
|
}
|
|
} |