mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
This commit is contained in:
parent
6bb416ce78
commit
04f3d39b45
@ -19,11 +19,12 @@ use LeagueTests\Stubs\ClientEntity;
|
|||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
use LeagueTests\Stubs\UserEntity;
|
use LeagueTests\Stubs\UserEntity;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\Response;
|
use Zend\Diactoros\Response;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
use Zend\Diactoros\ServerRequestFactory;
|
use Zend\Diactoros\ServerRequestFactory;
|
||||||
|
|
||||||
class AuthorizationServerTest extends \PHPUnit_Framework_TestCase
|
class AuthorizationServerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
namespace LeagueTests\Utils;
|
namespace LeagueTests\Utils;
|
||||||
|
|
||||||
use League\OAuth2\Server\CryptKey;
|
use League\OAuth2\Server\CryptKey;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class CryptKeyTest extends \PHPUnit_Framework_TestCase
|
class CryptKeyTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @expectedException \LogicException
|
* @expectedException \LogicException
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
namespace LeagueTests\Utils;
|
namespace LeagueTests\Utils;
|
||||||
|
|
||||||
use LeagueTests\Stubs\CryptTraitStub;
|
use LeagueTests\Stubs\CryptTraitStub;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class CryptTraitTest extends \PHPUnit_Framework_TestCase
|
class CryptTraitTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \LeagueTests\Stubs\CryptTraitStub
|
* @var \LeagueTests\Stubs\CryptTraitStub
|
||||||
|
@ -18,9 +18,10 @@ use LeagueTests\Stubs\AuthCodeEntity;
|
|||||||
use LeagueTests\Stubs\ClientEntity;
|
use LeagueTests\Stubs\ClientEntity;
|
||||||
use LeagueTests\Stubs\RefreshTokenEntity;
|
use LeagueTests\Stubs\RefreshTokenEntity;
|
||||||
use LeagueTests\Stubs\ScopeEntity;
|
use LeagueTests\Stubs\ScopeEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
class AbstractGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testGetSet()
|
public function testGetSet()
|
||||||
{
|
{
|
||||||
|
@ -22,9 +22,10 @@ use LeagueTests\Stubs\RefreshTokenEntity;
|
|||||||
use LeagueTests\Stubs\ScopeEntity;
|
use LeagueTests\Stubs\ScopeEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
use LeagueTests\Stubs\UserEntity;
|
use LeagueTests\Stubs\UserEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class AuthCodeGrantTest extends \PHPUnit_Framework_TestCase
|
class AuthCodeGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var CryptTraitStub
|
* @var CryptTraitStub
|
||||||
|
@ -10,9 +10,10 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
|
|||||||
use LeagueTests\Stubs\AccessTokenEntity;
|
use LeagueTests\Stubs\AccessTokenEntity;
|
||||||
use LeagueTests\Stubs\ClientEntity;
|
use LeagueTests\Stubs\ClientEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class ClientCredentialsGrantTest extends \PHPUnit_Framework_TestCase
|
class ClientCredentialsGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testGetIdentifier()
|
public function testGetIdentifier()
|
||||||
{
|
{
|
||||||
|
@ -18,9 +18,10 @@ use LeagueTests\Stubs\CryptTraitStub;
|
|||||||
use LeagueTests\Stubs\ScopeEntity;
|
use LeagueTests\Stubs\ScopeEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
use LeagueTests\Stubs\UserEntity;
|
use LeagueTests\Stubs\UserEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class ImplicitGrantTest extends \PHPUnit_Framework_TestCase
|
class ImplicitGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* CryptTrait stub
|
* CryptTrait stub
|
||||||
|
@ -15,9 +15,10 @@ use LeagueTests\Stubs\ClientEntity;
|
|||||||
use LeagueTests\Stubs\RefreshTokenEntity;
|
use LeagueTests\Stubs\RefreshTokenEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
use LeagueTests\Stubs\UserEntity;
|
use LeagueTests\Stubs\UserEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class PasswordGrantTest extends \PHPUnit_Framework_TestCase
|
class PasswordGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testGetIdentifier()
|
public function testGetIdentifier()
|
||||||
{
|
{
|
||||||
|
@ -16,9 +16,10 @@ use LeagueTests\Stubs\CryptTraitStub;
|
|||||||
use LeagueTests\Stubs\RefreshTokenEntity;
|
use LeagueTests\Stubs\RefreshTokenEntity;
|
||||||
use LeagueTests\Stubs\ScopeEntity;
|
use LeagueTests\Stubs\ScopeEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class RefreshTokenGrantTest extends \PHPUnit_Framework_TestCase
|
class RefreshTokenGrantTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var CryptTraitStub
|
* @var CryptTraitStub
|
||||||
|
@ -12,10 +12,11 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
|
|||||||
use LeagueTests\Stubs\AccessTokenEntity;
|
use LeagueTests\Stubs\AccessTokenEntity;
|
||||||
use LeagueTests\Stubs\ClientEntity;
|
use LeagueTests\Stubs\ClientEntity;
|
||||||
use LeagueTests\Stubs\StubResponseType;
|
use LeagueTests\Stubs\StubResponseType;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\Response;
|
use Zend\Diactoros\Response;
|
||||||
use Zend\Diactoros\ServerRequestFactory;
|
use Zend\Diactoros\ServerRequestFactory;
|
||||||
|
|
||||||
class AuthorizationServerMiddlewareTest extends \PHPUnit_Framework_TestCase
|
class AuthorizationServerMiddlewareTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testValidResponse()
|
public function testValidResponse()
|
||||||
{
|
{
|
||||||
|
@ -8,10 +8,11 @@ use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
|
|||||||
use League\OAuth2\Server\ResourceServer;
|
use League\OAuth2\Server\ResourceServer;
|
||||||
use LeagueTests\Stubs\AccessTokenEntity;
|
use LeagueTests\Stubs\AccessTokenEntity;
|
||||||
use LeagueTests\Stubs\ClientEntity;
|
use LeagueTests\Stubs\ClientEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\Response;
|
use Zend\Diactoros\Response;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class ResourceServerMiddlewareTest extends \PHPUnit_Framework_TestCase
|
class ResourceServerMiddlewareTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testValidResponse()
|
public function testValidResponse()
|
||||||
{
|
{
|
||||||
|
@ -6,9 +6,10 @@ namespace LeagueTests;
|
|||||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||||
use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
|
use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
|
||||||
use League\OAuth2\Server\ResourceServer;
|
use League\OAuth2\Server\ResourceServer;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequestFactory;
|
use Zend\Diactoros\ServerRequestFactory;
|
||||||
|
|
||||||
class ResourceServerTest extends \PHPUnit_Framework_TestCase
|
class ResourceServerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testValidateAuthenticatedRequest()
|
public function testValidateAuthenticatedRequest()
|
||||||
{
|
{
|
||||||
|
@ -11,11 +11,12 @@ use LeagueTests\Stubs\AccessTokenEntity;
|
|||||||
use LeagueTests\Stubs\ClientEntity;
|
use LeagueTests\Stubs\ClientEntity;
|
||||||
use LeagueTests\Stubs\RefreshTokenEntity;
|
use LeagueTests\Stubs\RefreshTokenEntity;
|
||||||
use LeagueTests\Stubs\ScopeEntity;
|
use LeagueTests\Stubs\ScopeEntity;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Zend\Diactoros\Response;
|
use Zend\Diactoros\Response;
|
||||||
use Zend\Diactoros\ServerRequest;
|
use Zend\Diactoros\ServerRequest;
|
||||||
|
|
||||||
class BearerResponseTypeTest extends \PHPUnit_Framework_TestCase
|
class BearerResponseTypeTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testGenerateHttpResponse()
|
public function testGenerateHttpResponse()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user