8000 Update test suite and report failed assertions · clue/reactphp-ami@cf5b0ff · GitHub
[go: up one dir, main page]

Skip to content

Commit cf5b0ff

Browse files
committed
Update test suite and report failed assertions
1 parent 7a1fcb6 commit cf5b0ff

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 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
env:
1212
LOGIN: username:password@localhost
1313
strategy:
@@ -25,12 +25,13 @@ jobs:
2525
- 5.4
2626
- 5.3
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2929
- uses: shivammathur/setup-php@v2
3030
with:
3131
php-version: ${{ matrix.php }}
3232
coverage: xdebug
33-
- run: sudo apt-get -qq update || true # update package list and ignore temporary network errors
33+
ini-file: development
34+
- run: sudo apt-get -qq update || true && sudo apt install -f # update package list and ignore temporary network errors
3435
- run: sudo apt-get --no-install-recommends -qq install -y asterisk
3536
- run: sudo cp tests/username.conf /etc/asterisk/manager.d/username.conf
3637
- run: sudo /etc/init.d/asterisk reload

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919
},
2020
"require-dev": {
2121
"clue/block-react": "^1.2",
22-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
22+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
2323
},
2424
"autoload": {
25-
"psr-4": { "Clue\\React\\Ami\\": "src/" }
25+
"psr-4": {
26+
"Clue\\React\\Ami\\": "src/"
27+
}
2628
},
2729
"autoload-dev": {
28-
"psr-4": { "Clue\\Tests\\React\\Ami\\": "tests/" }
30+
"psr-4": {
31+
"Clue\\Tests\\React\\Ami\\": "tests/"
32+
}
2933
}
3034
}

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.6+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -19,5 +19,10 @@
1919
</coverage>
2020
<php>
2121
<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" value="1" /> -->
24+
<ini name="assert.active" value="1" />
25+
<ini name="assert.exception" value="1" />
26+
<ini name="assert.bail" value="0" />
2227
</php>
2328
</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" 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)
0