Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add phpunit-polyfills to support PHP 8 #35

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ integration-test: guard-SMARTPAY_SECRET_KEY guard-SMARTPAY_PUBLIC_KEY guard-API_
test: guard-SMARTPAY_SECRET_KEY guard-SMARTPAY_PUBLIC_KEY guard-API_BASE
XDEBUG_MODE=coverage vendor/bin/phpunit tests --testdox --coverage-text --whitelist src/

clean-composer:
rm -rf composer.lock vendor

guard-%: GUARD
@ if [ -z '${${*}}' ]; then echo 'Environment variable $* not set.' && exit 1; fi
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
"caseyamcl/guzzle_retry_middleware": "^2.2"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"phpunit/phpunit": ">= 5.7",
"squizlabs/php_codesniffer": "^3.3",
"friendsofphp/php-cs-fixer": "2.17.1"
"friendsofphp/php-cs-fixer": ">= 2.19.3",
"yoast/phpunit-polyfills": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Integrations/OrderLifeCycleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use GuzzleHttp\Client as GuzzleClient;

final class OrderLifecycleTest extends TestCase
final class OrderLifeCycleTest extends TestCase
{
public function testOrderLifecycle()
{
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Smartpay\Smartpay;

abstract class TestCase extends \PHPUnit\Framework\TestCase
abstract class TestCase extends \Yoast\PHPUnitPolyfills\TestCases\TestCase
{
public function setUp()
public function set_up()
{
Smartpay::reset();

Expand All @@ -22,7 +22,7 @@ public function setUp()
}
}

public function tearDown()
public function tear_down()
{
Smartpay::reset();
}
Expand Down