oauth2-server/tests/unit/Storage/AbstractStorageTest.php
Graham Campbell 4c1cd04a24 CS fixes
2014-11-08 18:26:12 +00:00

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);
}
}