diff --git a/.travis.yml b/.travis.yml index 4cc9c93..7b653d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,7 @@ language: php php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - 7.3 - - hhvm - - nightly -matrix: - allow_failures: - - php: hhvm - - php: nightly + - 7.4 + - 8.0 script: - make test diff --git a/composer.json b/composer.json index c324e8b..2628431 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "ext-curl": "Simplifies the library usage (you don't have to provide your own requester)" }, "require-dev": { - "phpunit/phpunit": "~4.8.0", - "mockery/mockery": "~0.9.4" + "phpunit/phpunit": "~9.5.0", + "mockery/mockery": "~1.4.3" }, "autoload": { "psr-4": { diff --git a/tests/ShopCertification/ApiEndpointTest.php b/tests/ShopCertification/ApiEndpointTest.php index 6c77ec9..3b72a61 100644 --- a/tests/ShopCertification/ApiEndpointTest.php +++ b/tests/ShopCertification/ApiEndpointTest.php @@ -7,7 +7,7 @@ /** * @author Jakub Chábek */ -class ApiEndpointTest extends \PHPUnit_Framework_TestCase +class ApiEndpointTest extends \PHPUnit\Framework\TestCase { public function testGetEndpoint() @@ -18,7 +18,7 @@ public function testGetEndpoint() $apiEndpoint = new ApiEndpoint(ShopCertification::HEUREKA_SK); $this->assertSame(ApiEndpoint::API_ENDPOINT_SK, $apiEndpoint->getUrl()); - $this->setExpectedException('Heureka\ShopCertification\UnknownServiceException'); + $this->expectException('Heureka\ShopCertification\UnknownServiceException'); new ApiEndpoint(15); } diff --git a/tests/ShopCertification/ResponseTest.php b/tests/ShopCertification/ResponseTest.php index dac7d39..6acbc79 100644 --- a/tests/ShopCertification/ResponseTest.php +++ b/tests/ShopCertification/ResponseTest.php @@ -5,7 +5,7 @@ /** * @author Jakub Chábek */ -class ResponseTest extends \PHPUnit_Framework_TestCase +class ResponseTest extends \PHPUnit\Framework\TestCase { /** @@ -43,7 +43,7 @@ public function providerConstruct() public function testConstructWithMissingFields() { - $this->setExpectedException('Heureka\ShopCertification\InvalidResponseException'); + $this->expectException('Heureka\ShopCertification\InvalidResponseException'); new Response('{"message":"There was an error"}'); } @@ -54,7 +54,7 @@ public function testConstructWithMissingFields() */ public function testConstructWithInvalidJsonResponse($json) { - $this->setExpectedException('Heureka\ShopCertification\JsonException'); + $this->expectException('Heureka\ShopCertification\JsonException'); new Response($json); } diff --git a/tests/ShopCertificationTest.php b/tests/ShopCertificationTest.php index d086808..414e63f 100644 --- a/tests/ShopCertificationTest.php +++ b/tests/ShopCertificationTest.php @@ -10,10 +10,10 @@ /** * @author Jakub Chábek */ -class ShopCertificationTest extends \PHPUnit_Framework_TestCase +class ShopCertificationTest extends \PHPUnit\Framework\TestCase { - public function tearDown() + public function tearDown(): void { Mockery::close(); } @@ -27,7 +27,7 @@ public function testLogSetOrderWithInvalidOrderId() $shopCertification = new ShopCertification('xxxxxxxx', [], $requester); - $this->setExpectedException('\Heureka\ShopCertification\InvalidArgumentException'); + $this->expectException('\Heureka\ShopCertification\InvalidArgumentException'); $shopCertification->setOrderId('abcd'); } @@ -104,7 +104,7 @@ public function testLogOrderMissingEmail() $shopCertification = new ShopCertification('xxxxxxxxxx', [], $requester); - $this->setExpectedException('\Heureka\ShopCertification\MissingInformationException'); + $this->expectException('\Heureka\ShopCertification\MissingInformationException'); $shopCertification->logOrder(); } @@ -139,7 +139,7 @@ public function testLogOrderDoubleSend() $shopCertification->addProductItemId($product2); $shopCertification->logOrder(); - $this->setExpectedException('\Heureka\ShopCertification\Exception'); + $this->expectException('\Heureka\ShopCertification\Exception'); $shopCertification->logOrder(); }