Skip to content

Commit e22e347

Browse files
authored
Merge pull request #276 from PatronBase/ci-fixes
Add support for PHPUnit 10+ to CI process
2 parents 83552de + d772c89 commit e22e347

File tree

3 files changed

+46
-11
lines changed

3 files changed

+46
-11
lines changed

.github/workflows/phpunit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,10 @@ jobs:
5050
if: ${{ matrix.dependencies == 'highest' }}
5151
run: "composer update --no-interaction --no-progress"
5252

53-
- name: "Tests"
53+
- name: "Tests (PHPUnit 9)"
54+
if: ${{ matrix.php-version <= '8.0' }}
55+
run: "vendor/bin/phpunit --configuration phpunit9.xml.dist"
56+
57+
- name: "Tests (PHPUnit 10+)"
58+
if: ${{ matrix.php-version >= '8.1' }}
5459
run: "vendor/bin/phpunit"

phpunit.xml.dist

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
34
bootstrap="vendor/autoload.php"
45
backupGlobals="false"
5-
backupStaticAttributes="false"
6+
backupStaticProperties="false"
67
colors="true"
7-
verbose="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
118
processIsolation="false"
12-
stopOnFailure="false"
13-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
9+
stopOnFailure="false">
1410
<coverage>
15-
<include>
16-
<directory suffix=".php">src/</directory>
17-
</include>
1811
<report>
1912
<clover outputFile="build/logs/clover.xml"/>
2013
<html outputDirectory="build/coverage"/>
2114
<text outputFile="build/coverage.txt"/>
2215
</report>
2316
</coverage>
17+
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
18+
<include>
19+
<directory suffix=".php">src/</directory>
20+
</include>
21+
</source>
2422
<testsuites>
2523
<testsuite name="Omnipay Test Suite">
2624
<directory>tests</directory>

phpunit9.xml.dist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
4+
backupGlobals="false"
5+
backupStaticAttributes="false"
6+
colors="true"
7+
verbose="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
11+
processIsolation="false"
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>

0 commit comments

Comments
 (0)