diff --git a/composer.json b/composer.json index d6740aa4..d8d11125 100644 --- a/composer.json +++ b/composer.json @@ -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": [ diff --git a/tests/AuthorizationServerTest.php b/tests/AuthorizationServerTest.php index 4571c5e1..6fc59715 100644 --- a/tests/AuthorizationServerTest.php +++ b/tests/AuthorizationServerTest.php @@ -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() { diff --git a/tests/CryptKeyTest.php b/tests/CryptKeyTest.php index c7f7f4a0..f4fd0659 100644 --- a/tests/CryptKeyTest.php +++ b/tests/CryptKeyTest.php @@ -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 diff --git a/tests/CryptTraitTest.php b/tests/CryptTraitTest.php index 3d60ec9d..26427e59 100644 --- a/tests/CryptTraitTest.php +++ b/tests/CryptTraitTest.php @@ -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 diff --git a/tests/Grant/AbstractGrantTest.php b/tests/Grant/AbstractGrantTest.php index 4cd490e3..d0d9b3c8 100644 --- a/tests/Grant/AbstractGrantTest.php +++ b/tests/Grant/AbstractGrantTest.php @@ -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() { diff --git a/tests/Grant/AuthCodeGrantTest.php b/tests/Grant/AuthCodeGrantTest.php index d63aec29..213b4a03 100644 --- a/tests/Grant/AuthCodeGrantTest.php +++ b/tests/Grant/AuthCodeGrantTest.php @@ -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 diff --git a/tests/Grant/ClientCredentialsGrantTest.php b/tests/Grant/ClientCredentialsGrantTest.php index a1665831..96d8d578 100644 --- a/tests/Grant/ClientCredentialsGrantTest.php +++ b/tests/Grant/ClientCredentialsGrantTest.php @@ -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() { diff --git a/tests/Grant/ImplicitGrantTest.php b/tests/Grant/ImplicitGrantTest.php index 3bfe4b84..f962024a 100644 --- a/tests/Grant/ImplicitGrantTest.php +++ b/tests/Grant/ImplicitGrantTest.php @@ -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 diff --git a/tests/Grant/PasswordGrantTest.php b/tests/Grant/PasswordGrantTest.php index b380bfb2..0c1be581 100644 --- a/tests/Grant/PasswordGrantTest.php +++ b/tests/Grant/PasswordGrantTest.php @@ -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() { diff --git a/tests/Grant/RefreshTokenGrantTest.php b/tests/Grant/RefreshTokenGrantTest.php index 47d7ad17..f7f803f7 100644 --- a/tests/Grant/RefreshTokenGrantTest.php +++ b/tests/Grant/RefreshTokenGrantTest.php @@ -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 diff --git a/tests/Middleware/AuthorizationServerMiddlewareTest.php b/tests/Middleware/AuthorizationServerMiddlewareTest.php index 74dffbf7..bc860770 100644 --- a/tests/Middleware/AuthorizationServerMiddlewareTest.php +++ b/tests/Middleware/AuthorizationServerMiddlewareTest.php @@ -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() { diff --git a/tests/Middleware/ResourceServerMiddlewareTest.php b/tests/Middleware/ResourceServerMiddlewareTest.php index 549c8003..2269c45a 100644 --- a/tests/Middleware/ResourceServerMiddlewareTest.php +++ b/tests/Middleware/ResourceServerMiddlewareTest.php @@ -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() { diff --git a/tests/ResourceServerTest.php b/tests/ResourceServerTest.php index 8a3353cc..3120cad2 100644 --- a/tests/ResourceServerTest.php +++ b/tests/ResourceServerTest.php @@ -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() { diff --git a/tests/ResponseTypes/BearerResponseTypeTest.php b/tests/ResponseTypes/BearerResponseTypeTest.php index 7f710d92..daad734e 100644 --- a/tests/ResponseTypes/BearerResponseTypeTest.php +++ b/tests/ResponseTypes/BearerResponseTypeTest.php @@ -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() {