mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-29 16:30:44 +05:30
24 lines
665 B
PHP
24 lines
665 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Storage;
|
|
|
|
use League\OAuth2\Server\Storage\Adapter;
|
|
use LeagueTests\Stubs\StubAbstractServer;
|
|
|
|
class AdapterTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public 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);
|
|
}
|
|
}
|