From c712bd61c5365c29d8de37ca98d04f35c31e939b Mon Sep 17 00:00:00 2001 From: Patrick Kerrigan Date: Fri, 8 Nov 2019 14:37:24 +0000 Subject: [PATCH] Update dependencies and fix tests --- .gitignore | 3 ++- .travis.yml | 5 +---- composer.json | 5 +++-- test/JwtGuardTest.php | 5 +++-- test/JwtTokenAuthenticatorTest.php | 5 +++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index e0caea8..072705c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ -vendor/ \ No newline at end of file +vendor/ +composer.lock diff --git a/.travis.yml b/.travis.yml index f7fa3b5..6b53a10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,7 @@ language: php php: - - 5.5 - - 5.6 - - 7.0 - - 7.1 - 7.2 + - 7.3 install: composer install script: vendor/phpunit/phpunit/phpunit --coverage-clover build/logs/clover.xml test diff --git a/composer.json b/composer.json index 4f7c350..b0d6c8f 100644 --- a/composer.json +++ b/composer.json @@ -3,12 +3,13 @@ "description": "JWT authentication middleware for Dilex", "type": "project", "require": { - "clearbooks/dilex": "*", + "php": ">=7.2", + "clearbooks/dilex": "^2.0", "emarref/jwt": "^1.0.3" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^8" }, "license": "LGPL-3.0", "authors": [ diff --git a/test/JwtGuardTest.php b/test/JwtGuardTest.php index 12e6987..986d5ad 100644 --- a/test/JwtGuardTest.php +++ b/test/JwtGuardTest.php @@ -10,15 +10,16 @@ use Clearbooks\Dilex\JwtGuard; +use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; -class JwtGuardTest extends \PHPUnit_Framework_TestCase +class JwtGuardTest extends TestCase { private $request; - public function setUp() + public function setUp(): void { $this->request = new Request(); $this->request->headers->set('Authorization', 'Token'); diff --git a/test/JwtTokenAuthenticatorTest.php b/test/JwtTokenAuthenticatorTest.php index d9f2110..5fc3d71 100644 --- a/test/JwtTokenAuthenticatorTest.php +++ b/test/JwtTokenAuthenticatorTest.php @@ -15,9 +15,10 @@ use Emarref\Jwt\Encryption\Factory as EncryptionFactory; use Emarref\Jwt\Jwt; use Emarref\Jwt\Token; +use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; -class JwtTokenAuthenticatorTest extends \PHPUnit_Framework_TestCase +class JwtTokenAuthenticatorTest extends TestCase { const USER_ID = '1'; const GROUP_ID = '1'; @@ -191,7 +192,7 @@ private function serialiseToken( $token ) /** * Set up */ - public function setUp() + public function setUp(): void { $this->appIds = new StaticAppIdProvider( [self::APP_ID] ); $this->algorithm = new Hs512( "shhh... it's a secret" );