8000 Merge pull request #55 from clue-labs/update-tests · reactphp/datagram@f089460 · GitHub
[go: up one dir, main page]

Skip to content

Commit f089460

Browse files
authored
Merge pull request #55 from clue-labs/update-tests
Update test suite and report failed assertions
2 parents 028850f + 9f4bcd4 commit f089460

File tree

4 files changed

+47
-33
lines changed

4 files changed

+47
-33
lines changed

.github/workflows/ci.yml

Lines changed: 13 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-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 }}
@@ -37,13 +38,16 @@ jobs:
3738

3839
PHPUnit-hhvm:
3940
name: PHPUnit (HHVM)
40-
runs-on: ubuntu-18.04
41+
runs-on: ubuntu-22.04
4142
continue-on-error: true
4243
steps:
43-
- uses: actions/checkout@v2
44-
- uses: azjezz/setup-hhvm@v1
44+
- uses: actions/checkout@v3
45+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
46+
- name: Run hhvm composer.phar install
47+
uses: docker://hhvm/hhvm:3.30-lts-latest
4548
with:
46-
version: lts-3.30
47-
- run: composer self-update --2.2 # downgrade Composer for HHVM
48-
- run: hhvm $(which composer) install
49-
- run: hhvm vendor/bin/phpunit
49+
args: hhvm composer.phar install
50+
- name: Run hhvm vendor/bin/phpunit
51+
uses: docker://hhvm/hhvm:3.30-lts-latest
52+
with:
53+
args: hhvm vendor/bin/phpunit

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@
2626
"email": "cboden@gmail.com"
2727
}
2828
],
29-
"autoload": {
30-
"psr-4": {
31-
"React\\Datagram\\": "src"
32-
}
33-
},
34-
"autoload-dev": {
35-
"psr-4": {
36-
"React\\Tests\\Datagram\\": "tests"
37-
}
38-
},
3929
"require": {
4030
"php": ">=5.3",
4131
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
@@ -45,6 +35,16 @@
4535
},
4636
"require-dev": {
4737
"clue/block-react": "~1.0",
48-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
38+
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
39+
},
40+
"autoload": {
41+
"psr-4": {
42+
"React\\Datagram\\": "src/"
43+
}
44+
},
45+
"autoload-dev": {
46+
"psr-4": {
47+
"React\\Tests\\Datagram\\": "tests/"
48+
}
4949
}
5050
}

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="Datagram 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: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
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"
6-
backupGlobals="false"
7-
backupStaticAttributes="false"
86
bootstrap="vendor/autoload.php"
9-
colors="true"
10-
convertErrorsToExceptions="true"
11-
convertNoticesToExceptions="true"
12-
convertWarningsToExceptions="true"
13-
processIsolation="false"
14-
stopOnFailure="false">
7+
colors="true">
158
<testsuites>
169
<testsuite name="Datagram Test Suite">
1710
<directory>./tests/</directory>
@@ -22,4 +15,12 @@
2215
<directory>./src/</directory>
2316
</whitelist>
2417
</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" /> 498F
23+
<ini name="assert.exception" value="1" />
24+
<ini name="assert.bail" value="0" />
25+
</php>
2526
</phpunit>

0 commit comments

Comments
 (0)
0