Merge pull request #810 from gabriel-caruso/phpunit

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
This commit is contained in:
Andrew Millington 2017-11-08 20:03:08 +00:00 committed by GitHub
commit 661a0994c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 27 additions and 14 deletions

View File

@ -13,7 +13,7 @@
"defuse/php-encryption": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0",
"phpunit/phpunit": "^4.8.38 || ^5.7.21",
"zendframework/zend-diactoros": "^1.0"
},
"repositories": [

View File

@ -19,11 +19,12 @@ use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\StubResponseType;
use LeagueTests\Stubs\UserEntity;
use Psr\Http\Message\ResponseInterface;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\ServerRequestFactory;
class AuthorizationServerTest extends \PHPUnit_Framework_TestCase
class AuthorizationServerTest extends TestCase
{
public function setUp()
{

View File

@ -3,8 +3,9 @@
namespace LeagueTests\Utils;
use League\OAuth2\Server\CryptKey;
use PHPUnit\Framework\TestCase;
class CryptKeyTest extends \PHPUnit_Framework_TestCase
class CryptKeyTest extends TestCase
{
/**
* @expectedException \LogicException

View File

@ -3,8 +3,9 @@
namespace LeagueTests\Utils;
use LeagueTests\Stubs\CryptTraitStub;
use PHPUnit\Framework\TestCase;
class CryptTraitTest extends \PHPUnit_Framework_TestCase
class CryptTraitTest extends TestCase
{
/**
* @var \LeagueTests\Stubs\CryptTraitStub

View File

@ -18,9 +18,10 @@ use LeagueTests\Stubs\AuthCodeEntity;
use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\RefreshTokenEntity;
use LeagueTests\Stubs\ScopeEntity;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class AbstractGrantTest extends \PHPUnit_Framework_TestCase
class AbstractGrantTest extends TestCase
{
public function testGetSet()
{

View File

@ -22,9 +22,10 @@ use LeagueTests\Stubs\RefreshTokenEntity;
use LeagueTests\Stubs\ScopeEntity;
use LeagueTests\Stubs\StubResponseType;
use LeagueTests\Stubs\UserEntity;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class AuthCodeGrantTest extends \PHPUnit_Framework_TestCase
class AuthCodeGrantTest extends TestCase
{
/**
* @var CryptTraitStub

View File

@ -10,9 +10,10 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
use LeagueTests\Stubs\AccessTokenEntity;
use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\StubResponseType;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class ClientCredentialsGrantTest extends \PHPUnit_Framework_TestCase
class ClientCredentialsGrantTest extends TestCase
{
public function testGetIdentifier()
{

View File

@ -18,9 +18,10 @@ use LeagueTests\Stubs\CryptTraitStub;
use LeagueTests\Stubs\ScopeEntity;
use LeagueTests\Stubs\StubResponseType;
use LeagueTests\Stubs\UserEntity;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class ImplicitGrantTest extends \PHPUnit_Framework_TestCase
class ImplicitGrantTest extends TestCase
{
/**
* CryptTrait stub

View File

@ -15,9 +15,10 @@ use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\RefreshTokenEntity;
use LeagueTests\Stubs\StubResponseType;
use LeagueTests\Stubs\UserEntity;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class PasswordGrantTest extends \PHPUnit_Framework_TestCase
class PasswordGrantTest extends TestCase
{
public function testGetIdentifier()
{

View File

@ -16,9 +16,10 @@ use LeagueTests\Stubs\CryptTraitStub;
use LeagueTests\Stubs\RefreshTokenEntity;
use LeagueTests\Stubs\ScopeEntity;
use LeagueTests\Stubs\StubResponseType;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequest;
class RefreshTokenGrantTest extends \PHPUnit_Framework_TestCase
class RefreshTokenGrantTest extends TestCase
{
/**
* @var CryptTraitStub

View File

@ -12,10 +12,11 @@ use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
use LeagueTests\Stubs\AccessTokenEntity;
use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\StubResponseType;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequestFactory;
class AuthorizationServerMiddlewareTest extends \PHPUnit_Framework_TestCase
class AuthorizationServerMiddlewareTest extends TestCase
{
public function testValidResponse()
{

View File

@ -8,10 +8,11 @@ use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
use League\OAuth2\Server\ResourceServer;
use LeagueTests\Stubs\AccessTokenEntity;
use LeagueTests\Stubs\ClientEntity;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
class ResourceServerMiddlewareTest extends \PHPUnit_Framework_TestCase
class ResourceServerMiddlewareTest extends TestCase
{
public function testValidResponse()
{

View File

@ -6,9 +6,10 @@ namespace LeagueTests;
use League\OAuth2\Server\Exception\OAuthServerException;
use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
use League\OAuth2\Server\ResourceServer;
use PHPUnit\Framework\TestCase;
use Zend\Diactoros\ServerRequestFactory;
class ResourceServerTest extends \PHPUnit_Framework_TestCase
class ResourceServerTest extends TestCase
{
public function testValidateAuthenticatedRequest()
{

View File

@ -11,11 +11,12 @@ use LeagueTests\Stubs\AccessTokenEntity;
use LeagueTests\Stubs\ClientEntity;
use LeagueTests\Stubs\RefreshTokenEntity;
use LeagueTests\Stubs\ScopeEntity;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
class BearerResponseTypeTest extends \PHPUnit_Framework_TestCase
class BearerResponseTypeTest extends TestCase
{
public function testGenerateHttpResponse()
{