From ba874b1de9b3a893c688d0fa68cb6f54cbb96781 Mon Sep 17 00:00:00 2001 From: Alan Gabriel Bem Date: Mon, 22 Feb 2021 15:01:26 +0100 Subject: [PATCH] upgrade PHP to 7.4 --- .travis.yml | 9 ++++++--- composer.json | 4 ++-- tests/Josser/Tests/Protocol/JsonRpc1Test.php | 6 +++--- tests/Josser/Tests/Protocol/JsonRpc2Test.php | 6 +++--- tests/Josser/Tests/TestCase.php | 4 ++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index d213dc9..0700418 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,17 @@ dist: trusty language: php php: - - 5.6 - - 7.0 - 7.1 - 7.2 - 7.3 + - 7.4 + +env: + global: + - XDEBUG_MODE=coverage before_script: - wget http://getcomposer.org/composer.phar - php composer.phar install -script: bin/phpunit --coverage-text +script: bin/phpunit --coverage-text --debug diff --git a/composer.json b/composer.json index 1aef8a6..04de3c1 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ } ], "require": { - "php": ">=5.6.0", + "php": ">=7.1.0", "guzzlehttp/guzzle": "^5.0|^6.0", "symfony/serializer": "^2.0|^3.0|^4.0|^5.0" }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^7.0" }, "autoload": { "psr-0": { diff --git a/tests/Josser/Tests/Protocol/JsonRpc1Test.php b/tests/Josser/Tests/Protocol/JsonRpc1Test.php index bc94dac..0cf7375 100644 --- a/tests/Josser/Tests/Protocol/JsonRpc1Test.php +++ b/tests/Josser/Tests/Protocol/JsonRpc1Test.php @@ -103,7 +103,7 @@ public function testCreatingResponseFromValidDtoWithoutRpcError($responseDataTra */ public function testCreatingResponseFromValidDtoWithRpcError($responseDataTransferObject) { - $this->setExpectedException('Josser\Exception\RpcFaultException'); + $this->expectException('Josser\Exception\RpcFaultException'); $this->protocol->createResponse($responseDataTransferObject); } @@ -118,7 +118,7 @@ public function testCreatingResponseFromValidDtoWithRpcError($responseDataTransf */ public function testCreatingResponseFromInvalidDTOs($responseDataTransferObject) { - $this->setExpectedException('Josser\Exception\InvalidResponseException'); + $this->expectException('Josser\Exception\InvalidResponseException'); $this->protocol->createResponse($responseDataTransferObject); } @@ -149,7 +149,7 @@ public function testCreatingDTOFromValidRequest(RequestInterface $request, $expe */ public function testCreatingDTOFromInvalidRequest(RequestInterface $request) { - $this->setExpectedException('Josser\Exception\InvalidRequestException'); + $this->expectException('Josser\Exception\InvalidRequestException'); $this->protocol->getRequestDataTransferObject($request); } diff --git a/tests/Josser/Tests/Protocol/JsonRpc2Test.php b/tests/Josser/Tests/Protocol/JsonRpc2Test.php index f424500..5a6dcb6 100644 --- a/tests/Josser/Tests/Protocol/JsonRpc2Test.php +++ b/tests/Josser/Tests/Protocol/JsonRpc2Test.php @@ -107,7 +107,7 @@ public function testCreatingResponseFromValidDtoWithoutRpcError($responseDataTra */ public function testCreatingResponseFromValidDtoWithRpcError($responseDataTransferObject, $message, $code, $data) { - $this->setExpectedException('Josser\Exception\RpcFaultException', $message, $code); + $this->expectException('Josser\Exception\RpcFaultException', $message, $code); try { $this->protocol->createResponse($responseDataTransferObject); @@ -127,7 +127,7 @@ public function testCreatingResponseFromValidDtoWithRpcError($responseDataTransf */ public function testCreatingResponseFromInvalidDTOs($responseDataTransferObject) { - $this->setExpectedException('Josser\Exception\InvalidResponseException'); + $this->expectException('Josser\Exception\InvalidResponseException'); $this->protocol->createResponse($responseDataTransferObject); } @@ -158,7 +158,7 @@ public function testCreatingDTOFromValidRequest(RequestInterface $request, $expe */ public function testCreatingDTOFromInvalidRequest(RequestInterface $request) { - $this->setExpectedException('Josser\Exception\InvalidRequestException'); + $this->expectException('Josser\Exception\InvalidRequestException'); $this->protocol->getRequestDataTransferObject($request); } diff --git a/tests/Josser/Tests/TestCase.php b/tests/Josser/Tests/TestCase.php index e5fb457..8632bac 100644 --- a/tests/Josser/Tests/TestCase.php +++ b/tests/Josser/Tests/TestCase.php @@ -11,6 +11,6 @@ namespace Josser\Tests; -class TestCase extends \PHPUnit_Framework_TestCase +class TestCase extends \PHPUnit\Framework\TestCase { -} \ No newline at end of file +}