mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-05 04:58:57 +05:30
24 lines
690 B
PHP
24 lines
690 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Storage;
|
|
|
|
use LeagueTests\Stubs\StubAbstractServer;
|
|
use LeagueTests\Stubs\StubAbstractStorage;
|
|
|
|
class AbstractStorageTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testSetGet()
|
|
{
|
|
$storage = new StubAbstractStorage();
|
|
|
|
$reflector = new \ReflectionClass($storage);
|
|
$setMethod = $reflector->getMethod('setServer');
|
|
$setMethod->setAccessible(true);
|
|
$setMethod->invokeArgs($storage, [new StubAbstractServer()]);
|
|
$getMethod = $reflector->getMethod('getServer');
|
|
$getMethod->setAccessible(true);
|
|
|
|
$this->assertTrue($getMethod->invoke($storage) instanceof StubAbstractServer);
|
|
}
|
|
}
|