diff --git a/.travis.yml b/.travis.yml index 2ffe939..e52918e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,6 @@ env: matrix: fast_finish: true include: - - php: 7.1 - env: - - DEPS=lowest - - php: 7.1 - env: - - DEPS=latest - - TEST_COVERAGE=true - php: 7.2 env: - DEPS=lowest diff --git a/composer.json b/composer.json index 3267de0..09c3c89 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ } }, "require": { - "php": "^7.1", + "php": "^7.2", "laminas/laminas-eventmanager": "^2.6.4 || ^3.2.1", "laminas/laminas-http": "^2.10", "laminas/laminas-mvc": "^2.7.15 || ^3.1.1", @@ -45,7 +45,7 @@ "laminas/laminas-modulemanager": "^2.7.2", "laminas/laminas-serializer": "^2.8", "laminas/laminas-view": "^2.8.1", - "phpunit/phpunit": "^7.5.18 || ^8.5.1", + "phpunit/phpunit": "^8.5.1", "php-coveralls/php-coveralls": "^2.1", "squizlabs/php_codesniffer": "^3.4" }, diff --git a/composer.lock b/composer.lock index 96df753..7c96b53 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6d7a8026407830f9bd4bcb90afffe384", + "content-hash": "f0cbcdd52fc42e71b45b56a243fe8aed", "packages": [ { "name": "brick/varexporter", @@ -4716,7 +4716,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": "^7.2" }, "platform-dev": [], "plugin-api-version": "1.1.0" diff --git a/tests/LmcCorsTest/ModuleTest.php b/tests/LmcCorsTest/ModuleTest.php index 8a37f5c..98d9a2e 100644 --- a/tests/LmcCorsTest/ModuleTest.php +++ b/tests/LmcCorsTest/ModuleTest.php @@ -49,12 +49,12 @@ public function testAssertListenerIsCorrectlyRegistered() { $module = new Module(); $mvcEvent = $this->getMockBuilder('Laminas\Mvc\MvcEvent')->getMock(); - $application = $this->getMockBuilder('Laminas\Mvc\Application', [], [], '', false) + $application = $this->getMockBuilder('Laminas\Mvc\Application') ->disableOriginalConstructor() ->getMock(); $eventManager = $this->getMockBuilder('Laminas\EventManager\EventManagerInterface')->getMock(); $serviceManager = $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->getMock(); - $corsListener = $this->getMockBuilder('LmcCors\Mvc\CorsRequestListener', [], [], '', false) + $corsListener = $this->getMockBuilder('LmcCors\Mvc\CorsRequestListener') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/LmcCorsTest/Service/CorsServiceTest.php b/tests/LmcCorsTest/Service/CorsServiceTest.php index 8d506b5..4dc7597 100644 --- a/tests/LmcCorsTest/Service/CorsServiceTest.php +++ b/tests/LmcCorsTest/Service/CorsServiceTest.php @@ -18,6 +18,8 @@ namespace LmcCorsTest\Service; +use LmcCors\Exception\DisallowedOriginException; +use LmcCors\Exception\InvalidOriginException; use PHPUnit\Framework\TestCase as TestCase; use Laminas\Http\Response as HttpResponse; use Laminas\Http\Request as HttpRequest; @@ -289,7 +291,7 @@ public function testRefuseNormalCorsRequestIfUnauthorized() $request->getHeaders()->addHeaderLine('Origin', 'http://unauthorized.com'); - $this->expectException(\LmcCors\Exception\DisallowedOriginException::class); + $this->expectException(DisallowedOriginException::class); $this->expectExceptionMessage('The origin "http://unauthorized.com" is not authorized'); $this->corsService->populateCorsResponse($request, $response); @@ -424,7 +426,7 @@ public function testDoesNotCrashApplicationOnInvalidOriginValue() $request = new HttpRequest(); $request->setUri('https://example.com'); $request->getHeaders()->addHeaderLine('Origin', 'file:'); - $this->expectException(\LmcCors\Exception\InvalidOriginException::class); + $this->expectException(InvalidOriginException::class); $this->corsService->isCorsRequest($request); } @@ -472,7 +474,7 @@ public function testCanPopulateNormalCorsRequestWithRouteMatchRewriteException() $request->getHeaders()->addHeaderLine('Origin', 'http://example.com'); - $this->expectException(\LmcCors\Exception\DisallowedOriginException::class); + $this->expectException(DisallowedOriginException::class); $this->corsService->populateCorsResponse($request, $response, $routeMatch); } }