mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 21:49:50 +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);
|
|
}
|
|
}
|