Skip to content

Commit 464b8a3

Browse files
committed
Update test suite and report failed assertions
1 parent d0d739a commit 464b8a3

File tree

4 files changed

+43
-18
lines changed

4 files changed

+43
-18
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 12 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 }}
@@ -41,25 +42,32 @@ jobs:
4142
runs-on: macos-12
4243
continue-on-error: true
4344
steps:
44-
- uses: actions/checkout@v2
45+
- uses: actions/checkout@v3
4546
- uses: shivammathur/setup-php@v2
4647
with:
47-
php-version: 8.0
48+
php-version: 8.1
4849
coverage: xdebug
50+
ini-file: development
4951
- run: composer install
5052
- run: vendor/bin/phpunit --coverage-text
5153
- run: time php examples/91-benchmark-throughput.php
5254

5355
PHPUnit-hhvm:
5456
name: PHPUnit (HHVM)
55-
runs-on: ubuntu-18.04
57+
runs-on: ubuntu-22.04
5658
continue-on-error: true
5759
steps:
58-
- uses: actions/checkout@v2
59-
- uses: azjezz/setup-hhvm@v1
60+
- uses: actions/checkout@v3
61+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
62+
- name: Run hhvm composer.phar install
63+
uses: docker://hhvm/hhvm:3.30-lts-latest
6064
with:
61-
version: lts-3.30
62-
- run: composer self-update --2.2 # downgrade Composer for HHVM
63-
- run: hhvm $(which composer) install
64-
- run: hhvm vendor/bin/phpunit
65-
- run: time php examples/91-benchmark-throughput.php
65+
args: hhvm composer.phar install
66+
- name: Run hhvm vendor/bin/phpunit
67+
uses: docker://hhvm/hhvm:3.30-lts-latest
68+
with:
69+
args: hhvm vendor/bin/phpunit
70+
- name: Run time hhvm examples/91-benchmark-throughput.php
71+
uses: docker://hhvm/hhvm:3.30-lts-latest
72+
with:
73+
args: time hhvm examples/91-benchmark-throughput.php

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"evenement/evenement": "^3.0 || ^2.0 || ^1.0"
3232
},
3333
"require-dev": {
34-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35",
34+
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35",
3535
"clue/stream-filter": "~1.2"
3636
},
3737
"autoload": {

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="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=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>
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=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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy