diff --git a/src/Storage/Adapter.php b/src/Storage/AbstractStorage.php similarity index 90% rename from src/Storage/Adapter.php rename to src/Storage/AbstractStorage.php index e9f3f1d6..5c18e7b8 100644 --- a/src/Storage/Adapter.php +++ b/src/Storage/AbstractStorage.php @@ -1,6 +1,6 @@ @@ -14,9 +14,9 @@ namespace League\OAuth2\Server\Storage; use League\OAuth2\Server\AbstractServer; /** - * Storage adapter class + * Abstract storage class */ -class Adapter +abstract class AbstractStorage { /** * Server diff --git a/tests/unit/Storage/AdapterTest.php b/tests/unit/Storage/AbstractStorageTest.php similarity index 51% rename from tests/unit/Storage/AdapterTest.php rename to tests/unit/Storage/AbstractStorageTest.php index 1610b4d0..6b943f71 100644 --- a/tests/unit/Storage/AdapterTest.php +++ b/tests/unit/Storage/AbstractStorageTest.php @@ -2,22 +2,22 @@ namespace LeagueTests\Storage; -use League\OAuth2\Server\Storage\Adapter; +use LeagueTests\Stubs\StubAbstractStorage; use LeagueTests\Stubs\StubAbstractServer; -class AdapterTest extends \PHPUnit_Framework_TestCase +class AdapterStorageTest extends \PHPUnit_Framework_TestCase { public function testSetGet() { - $adapter = new Adapter; + $storage = new StubAbstractStorage; - $reflector = new \ReflectionClass($adapter); + $reflector = new \ReflectionClass($storage); $setMethod = $reflector->getMethod('setServer'); $setMethod->setAccessible(true); - $setMethod->invokeArgs($adapter, [new StubAbstractServer]); + $setMethod->invokeArgs($storage, [new StubAbstractServer]); $getMethod = $reflector->getMethod('getServer'); $getMethod->setAccessible(true); - $this->assertTrue($getMethod->invoke($adapter) instanceof StubAbstractServer); + $this->assertTrue($getMethod->invoke($storage) instanceof StubAbstractServer); } } diff --git a/tests/unit/Stubs/StubAbstractStorage.php b/tests/unit/Stubs/StubAbstractStorage.php new file mode 100644 index 00000000..cb920f94 --- /dev/null +++ b/tests/unit/Stubs/StubAbstractStorage.php @@ -0,0 +1,8 @@ +