Skip to content

Commit c8dc896

Browse files
cluelucasnetau
authored andcommitted
Update test suite and report failed assertions
1 parent 9652722 commit c8dc896

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
php:
@@ -24,11 +24,12 @@ jobs:
2424
- 5.4
2525
- 5.3
2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- 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 }}
@@ -40,23 +41,27 @@ jobs:
4041
runs-on: macos-12
4142
continue-on-error: true
4243
steps:
43-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v3
4445
- uses: shivammathur/setup-php@v2
4546
with:
4647
php-version: 8.1
4748
coverage: xdebug
49+
ini-file: development
4850
- run: composer install
4951
- run: vendor/bin/phpunit --coverage-text
5052

5153
PHPUnit-hhvm:
5254
name: PHPUnit (HHVM)
53-
runs-on: ubuntu-18.04
55+
runs-on: ubuntu-22.04
5456
continue-on-error: true
5557
steps:
56-
- uses: actions/checkout@v2
57-
- uses: azjezz/setup-hhvm@v1
58+
- uses: actions/checkout@v3
59+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
60+
- name: Run hhvm composer.phar install
61+
uses: docker://hhvm/hhvm:3.30-lts-latest
5862
with:
59-
version: lts-3.30
60-
- run: composer self-update --2.2 # downgrade Composer for HHVM
61-
- run: hhvm $(which composer) install
62-
- run: hhvm vendor/bin/phpunit
63+
args: hhvm composer.phar install
64+
- name: Run hhvm vendor/bin/phpunit
65+
uses: docker://hhvm/hhvm:3.30-lts-latest
66+
with:
67+
args: hhvm vendor/bin/phpunit

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@
3333
"react/promise-timer": "^1.9"
3434
},
3535
"require-dev": {
36-
"phpunit/phpunit": "^9.3 || ^4.8.35",
36+
"phpunit/phpunit": "^9.5 || ^4.8.35",
3737
"react/async": "^4 || ^3 || ^2"
3838
},
3939
"autoload": {
40-
"psr-4": { "React\\Dns\\": "src" }
40+
"psr-4": {
41+
"React\\Dns\\": "src/"
42+
}
4143
},
4244
"autoload-dev": {
43-
"psr-4": { "React\\Tests\\Dns\\": "tests" }
45+
"psr-4": {
46+
"React\\Tests\\Dns\\": "tests/"
47+
}
4448
}
4549
}

phpunit.xml.dist

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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"
77
cacheResult="false"
88
colors="true"
@@ -17,4 +17,12 @@
1717
<directory>./src/</directory>
1818
</include>
1919
</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=1" 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>
2028
</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=1" 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)