Skip to content

Commit

Permalink
Merge pull request #30 from vojtasvoboda/feature/php-74-80
Browse files Browse the repository at this point in the history
Add support for PHP 7.4/8.0
  • Loading branch information
MiroslavHlavka authored May 13, 2021
2 parents aa52add + f46e8d3 commit 0e80d5c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions tests/ShopCertification/ApiEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @author Jakub Chábek <[email protected]>
*/
class ApiEndpointTest extends \PHPUnit_Framework_TestCase
class ApiEndpointTest extends \PHPUnit\Framework\TestCase
{

public function testGetEndpoint()
Expand All @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/ShopCertification/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* @author Jakub Chábek <[email protected]>
*/
class ResponseTest extends \PHPUnit_Framework_TestCase
class ResponseTest extends \PHPUnit\Framework\TestCase
{

/**
Expand Down Expand Up @@ -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"}');
}

Expand All @@ -54,7 +54,7 @@ public function testConstructWithMissingFields()
*/
public function testConstructWithInvalidJsonResponse($json)
{
$this->setExpectedException('Heureka\ShopCertification\JsonException');
$this->expectException('Heureka\ShopCertification\JsonException');
new Response($json);
}

Expand Down
10 changes: 5 additions & 5 deletions tests/ShopCertificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/**
* @author Jakub Chábek <[email protected]>
*/
class ShopCertificationTest extends \PHPUnit_Framework_TestCase
class ShopCertificationTest extends \PHPUnit\Framework\TestCase
{

public function tearDown()
public function tearDown(): void
{
Mockery::close();
}
Expand All @@ -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');
}

Expand Down Expand Up @@ -104,7 +104,7 @@ public function testLogOrderMissingEmail()

$shopCertification = new ShopCertification('xxxxxxxxxx', [], $requester);

$this->setExpectedException('\Heureka\ShopCertification\MissingInformationException');
$this->expectException('\Heureka\ShopCertification\MissingInformationException');
$shopCertification->logOrder();
}

Expand Down Expand Up @@ -139,7 +139,7 @@ public function testLogOrderDoubleSend()
$shopCertification->addProductItemId($product2);
$shopCertification->logOrder();

$this->setExpectedException('\Heureka\ShopCertification\Exception');
$this->expectException('\Heureka\ShopCertification\Exception');
$shopCertification->logOrder();
}

Expand Down

0 comments on commit 0e80d5c

Please sign in to comment.