Skip to content

Commit cf3afc2

Browse files
committed
Upgrade phpunit to 9
1 parent b833dff commit cf3afc2

10 files changed

+35
-30
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ phpunit.xml
66
.directory
77
reports/
88
documents/
9-
.idea
9+
.idea
10+
.phpunit.result.cache

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
"classmap": ["tests/OmnipayTest.php"]
4343
},
4444
"require": {
45-
"php": "^5.6|^7|^8",
45+
"php": "^7.3|^8",
4646
"php-http/client-implementation": "^1",
4747
"php-http/message": "^1.5",
4848
"php-http/discovery": "^1.2.1",
4949
"symfony/http-foundation": "^2.1|^3|^4|^5",
5050
"moneyphp/money": "^3.1"
5151
},
5252
"require-dev": {
53-
"omnipay/tests": "^3",
53+
"omnipay/tests": "^4",
5454
"php-http/mock-client": "^1",
5555
"squizlabs/php_codesniffer": "^3.5"
5656
},

phpunit.xml.dist

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
34
backupGlobals="false"
45
backupStaticAttributes="false"
56
colors="true"
@@ -8,21 +9,24 @@
89
convertNoticesToExceptions="true"
910
convertWarningsToExceptions="true"
1011
processIsolation="false"
11-
stopOnFailure="false">
12-
<testsuites>
13-
<testsuite name="Omnipay Test Suite">
14-
<directory>tests</directory>
15-
</testsuite>
16-
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="junit" target="build/report.junit.xml"/>
24-
<log type="coverage-html" target="build/coverage"/>
25-
<log type="coverage-text" target="build/coverage.txt"/>
26-
<log type="coverage-clover" target="build/logs/clover.xml"/>
27-
</logging>
28-
</phpunit>
12+
stopOnFailure="false"
13+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14+
<coverage>
15+
<include>
16+
<directory suffix=".php">src/</directory>
17+
</include>
18+
<report>
19+
<clover outputFile="build/logs/clover.xml"/>
20+
<html outputDirectory="build/coverage"/>
21+
<text outputFile="build/coverage.txt"/>
22+
</report>
23+
</coverage>
24+
<testsuites>
25+
<testsuite name="Omnipay Test Suite">
26+
<directory>tests</directory>
27+
</testsuite>
28+
</testsuites>
29+
<logging>
30+
<junit outputFile="build/report.junit.xml"/>
31+
</logging>
32+
</phpunit>

tests/Common/AbstractGatewayTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AbstractGatewayTest extends TestCase
1313
/** @var \Omnipay\Common\AbstractGateway */
1414
protected $gateway;
1515

16-
public function setUp()
16+
public function setUp() : void
1717
{
1818
$this->gateway = new AbstractGatewayTest_MockAbstractGateway();
1919
$this->gateway->initialize();

tests/Common/CreditCardTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CreditCardTest extends TestCase
1010
/** @var CreditCard */
1111
private $card;
1212

13-
public function setUp()
13+
public function setUp() : void
1414
{
1515
$this->card = new CreditCard;
1616
$this->card->setNumber('4111111111111111');

tests/Common/GatewayFactoryTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
class GatewayFactoryTest extends TestCase
99
{
10-
public static function setUpBeforeClass()
10+
public static function setUpBeforeClass() : void
1111
{
1212
m::mock('alias:Omnipay\\SpareChange\\TestGateway');
1313
}
1414

15-
public function setUp()
15+
public function setUp() : void
1616
{
1717
$this->factory = new GatewayFactory;
1818
}

tests/Common/ItemBagTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ItemBagTest extends TestCase
88
{
9-
public function setUp()
9+
public function setUp() : void
1010
{
1111
$this->bag = new ItemBag;
1212
}

tests/Common/ItemTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ItemTest extends TestCase
88
{
9-
public function setUp()
9+
public function setUp() : void
1010
{
1111
$this->item = new Item;
1212
}

tests/Common/Message/AbstractRequestTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AbstractRequestTest extends TestCase
1414
/** @var AbstractRequest */
1515
protected $request;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->request = new AbstractRequestTest_MockAbstractRequest($this->getHttpClient(), $this->getHttpRequest());
2020
$this->request->initialize();

tests/Common/Message/AbstractResponseTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AbstractResponseTest extends TestCase
1010
/** @var AbstractResponse */
1111
protected $response;
1212

13-
public function setUp()
13+
public function setUp(): void
1414
{
1515
$this->response = m::mock('\Omnipay\Common\Message\AbstractResponse')->makePartial();
1616
}

0 commit comments

Comments
 (0)