Skip to content

Commit 863c4a6

Browse files
authored
Merge pull request #240 from clue-labs/update-tests
[3.x] Update test suite and report failed assertions
2 parents 84f2046 + b7eea9a commit 863c4a6

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 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:
@@ -19,11 +19,12 @@ jobs:
1919
- 7.2
2020
- 7.1
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323
- uses: shivammathur/setup-php@v2
2424
with:
2525
php-version: ${{ matrix.php }}
2626
coverage: xdebug
27+
ini-file: development
2728
- run: composer install
2829
- run: vendor/bin/phpunit --coverage-text
2930
if: ${{ matrix.php >= 7.3 }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"php": ">=7.1.0"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": "^9.3 || ^7.5"
31+
"phpunit/phpunit": "^9.5 || ^7.5"
3232
},
3333
"autoload": {
3434
"psr-4": {

phpunit.xml.dist

Lines changed: 8 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"
@@ -22,5 +22,10 @@
2222
</coverage>
2323
<php>
2424
<ini name="error_reporting" value="-1" />
25+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
26+
<!-- <ini name="zend.assertions=1" value="1" /> -->
27+
<ini name="assert.active" value="1" />
28+
<ini name="assert.exception" value="1" />
29+
<ini name="assert.bail" value="0" />
2530
</php>
2631
</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 before PHPUnit 9 -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
@@ -18,4 +18,12 @@
1818
</exclude>
1919
</whitelist>
2020
</filter>
21+
<php>
22+
<ini name="error_reporting" value="-1" />
23+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
24+
<!-- <ini name="zend.assertions=1" value="1" /> -->
25+
<ini name="assert.active" value="1" />
26+
<ini name="assert.exception" value="1" />
27+
<ini name="assert.bail" value="0" />
28+
</php>
2129
</phpunit>

0 commit comments

Comments
 (0)