Skip to content

Commit 5f25058

Browse files
committed
Update test suite and report failed assertions
1 parent f800f3a commit 5f25058

File tree

4 files changed

+39
-17
lines changed

4 files changed

+39
-17
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66

77
jobs:
88
PHPUnit:
9-
runs-on: ubuntu-20.04
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-22.04
1011
strategy:
1112
matrix:
1213
php:
@@ -23,12 +24,12 @@ jobs:
2324
- 5.4
2425
- 5.3
2526
steps:
26-
- uses: actions/checkout@v2
27-
- name: Setup PHP
28-
uses: shivammathur/setup-php@v2
27+
- uses: actions/checkout@v3
28+
- uses: shivammathur/setup-php@v2
2929
with:
3030
php-version: ${{ matrix.php }}
3131
coverage: xdebug
32+
ini-file: development
3233
- run: composer install
3334
- run: vendor/bin/phpunit --coverage-text
3435
if: ${{ matrix.php >= 7.3 }}

composer.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
"email": "[email protected]"
1111
}
1212
],
13-
"autoload": {
14-
"psr-4": { "Clue\\React\\Docker\\": "src/" }
15-
},
16-
"autoload-dev": {
17-
"psr-4": { "Clue\\Tests\\React\\Docker\\": "tests/" }
18-
},
1913
"require": {
2014
"php": ">=5.3",
2115
"clue/json-stream": "^0.1",
@@ -28,9 +22,19 @@
2822
"rize/uri-template": "^0.3"
2923
},
3024
"require-dev": {
31-
"react/async": "^4 || ^3 || ^2",
3225
"clue/caret-notation": "^0.2",
3326
"clue/tar-react": "^0.2",
34-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
27+
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35",
28+
"react/async": "^4 || ^3 || ^2"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"Clue\\React\\Docker\\": "src/"
33+
}
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"Clue\\Tests\\React\\Docker\\": "tests/"
38+
}
3539
}
3640
}

phpunit.xml.dist

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7+
cacheResult="false"
78
colors="true"
8-
cacheResult="false">
9+
convertDeprecationsToExceptions="true">
910
<testsuites>
1011
<testsuite name="Docker React Test Suite">
1112
<directory>./tests/</directory>
@@ -16,4 +17,12 @@
1617
<directory>./src/</directory>
1718
</include>
1819
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
23+
<!-- <ini name="zend.assertions" value="1" /> -->
24+
<ini name="assert.active" value="1" />
25+
<ini name="assert.exception" value="1" />
26+
<ini name="assert.bail" value="0" />
27+
</php>
1928
</phpunit>

phpunit.xml.legacy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
@@ -15,4 +15,12 @@
1515
<directory>./src/</directory>
1616
</whitelist>
1717
</filter>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21+
<!-- <ini name="zend.assertions" value="1" /> -->
22+
<ini name="assert.active" value="1" />
23+
<ini name="assert.exception" value="1" />
24+
<ini name="assert.bail" value="0" />
25+
</php>
1826
</phpunit>

0 commit comments

Comments
 (0)