Skip to content

Commit 0c3c3ca

Browse files
authored
Merge pull request #501 from clue-labs/update-tests
Update test suite and report failed assertions
2 parents a559642 + 300bfaf commit 0c3c3ca

File tree

4 files changed

+42
-18
lines changed

4 files changed

+42
-18
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 9 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-18.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
php:
@@ -24,11 +24,16 @@ 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
33+
ini-values: disable_functions='' # do not disable PCNTL functions on PHP < 8.1
34+
extensions: sockets, pcntl
35+
env:
36+
fail-fast: true # fail step if any extension can not be installed
3237
- run: composer install
3338
- run: vendor/bin/phpunit --coverage-text --exclude-group internet
3439
if: ${{ matrix.php >= 7.3 }}
@@ -37,13 +42,16 @@ jobs:
3742

3843
PHPUnit-hhvm:
3944
name: PHPUnit (HHVM)
40-
runs-on: ubuntu-18.04
45+
runs-on: ubuntu-22.04
4146
continue-on-error: true
4247
steps:
43-
- uses: actions/checkout@v2
44-
- uses: azjezz/setup-hhvm@v1
48+
- uses: actions/checkout@v3
49+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
50+
- name: Run hhvm composer.phar require react/async:^2 react/promise:^2 # downgrade Async and Promise for HHVM
51+
uses: docker://hhvm/hhvm:3.30-lts-latest
4552
with:
46-
version: lts-3.30
47-
- run: composer self-update --2.2 # downgrade Composer for HHVM
48-
- run: hhvm $(which composer) require react/async:^2 react/promise:^2 # downgrade Async and Promise for HHVM
49-
- run: hhvm vendor/bin/phpunit --exclude-group internet
53+
args: hhvm composer.phar require react/async:^2 react/promise:^2
54+
- name: Run hhvm vendor/bin/phpunit --exclude-group internet
55+
uses: docker://hhvm/hhvm:3.30-lts-latest
56+
with:
57+
args: hhvm vendor/bin/phpunit --exclude-group internet

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
"php": ">=5.3.8",
1212
"react/async": "^4 || ^3 || ^2",
1313
"react/cache": "^1.1",
14-
"react/dns": "^1.10",
15-
"react/event-loop": "^1.3",
14+
"react/dns": "^1.11",
15+
"react/event-loop": "^1.4",
1616
"react/http": "^1.8",
17-
"react/promise": "^3 || ^2.9 || ^1.2",
17+
"react/promise": "^3 || ^2.10 || ^1.2",
1818
"react/promise-stream": "^1.5",
1919
"react/promise-timer": "^1.9",
20-
"react/socket": "^1.12",
21-
"react/stream": "^1.2"
20+
"react/socket": "^1.13",
21+
"react/stream": "^1.3"
2222
},
2323
"require-dev": {
2424
"clue/stream-filter": "^1.3",
25-
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
25+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
2626
},
2727
"config": {
2828
"preferred-install": {

phpunit.xml.dist

Lines changed: 10 additions & 2 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.5+ -->
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="tests/bootstrap.php"
77
cacheResult="false"
88
colors="true"
@@ -19,4 +19,12 @@
1919
<directory>./vendor/react/*/src/</directory>
2020
</include>
2121
</coverage>
22+
<php>
23+
<ini name="error_reporting" value="-1" />
24+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
25+
<!-- <ini name="zend.assertions" value="1" /> -->
26+
<ini name="assert.active" value="1" />
27+
<ini name="assert.exception" value="1" />
28+
<ini name="assert.bail" value="0" />
29+
</php>
2230
</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 PHPUnit format for PHP < 7.3 -->
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="tests/bootstrap.php"
@@ -15,4 +15,12 @@
1515
<directory>./vendor/react/*/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)
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