mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 05:29:52 +05:30
Renamed Resource to ResourceServer
This commit is contained in:
parent
013b1b53b4
commit
468acbc369
@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
/**
|
/**
|
||||||
* OAuth 2.0 Resource Server
|
* OAuth 2.0 Resource Server
|
||||||
*/
|
*/
|
||||||
class Resource extends AbstractServer
|
class ResourceServer extends AbstractServer
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The access token
|
* The access token
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace LeagueTests;
|
namespace LeagueTests;
|
||||||
|
|
||||||
use League\OAuth2\Server\Resource;
|
use League\OAuth2\Server\ResourceServer;
|
||||||
use League\OAuth2\Server\Grant\GrantTypeInterface;
|
use League\OAuth2\Server\Grant\GrantTypeInterface;
|
||||||
use League\OAuth2\Server\Entity\AccessToken;
|
use League\OAuth2\Server\Entity\AccessToken;
|
||||||
use League\OAuth2\Server\Entity\Session;
|
use League\OAuth2\Server\Entity\Session;
|
||||||
@ -10,7 +10,7 @@ use League\OAuth2\Server\Entity\Client;
|
|||||||
use League\OAuth2\Server\Entity\Scope;
|
use League\OAuth2\Server\Entity\Scope;
|
||||||
use \Mockery as M;
|
use \Mockery as M;
|
||||||
|
|
||||||
class ResourceTests extends \PHPUnit_Framework_TestCase
|
class ResourceServerTests extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private function returnDefault()
|
private function returnDefault()
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
@ -44,7 +44,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
@ -69,7 +69,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
@ -106,7 +106,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
@ -141,7 +141,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
@ -165,7 +165,7 @@ class ResourceTests extends \PHPUnit_Framework_TestCase
|
|||||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||||
$scopeStorage->shouldReceive('setServer');
|
$scopeStorage->shouldReceive('setServer');
|
||||||
|
|
||||||
$server = new Resource(
|
$server = new ResourceServer(
|
||||||
$sessionStorage,
|
$sessionStorage,
|
||||||
$accessTokenStorage,
|
$accessTokenStorage,
|
||||||
$clientStorage,
|
$clientStorage,
|
||||||
|
Loading…
Reference in New Issue
Block a user