Skip to content

Commit

Permalink
Merge pull request #39 from clue-labs/update-tests
Browse files Browse the repository at this point in the history
Update test suite and report failed assertions
  • Loading branch information
SimonFrings authored Feb 6, 2023
2 parents cdfd621 + f38b100 commit f156e70
Showing 4 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
coverage: xdebug
ini-file: development
- run: composer install
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
if: ${{ matrix.php >= 7.3 }}
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -17,12 +17,16 @@
"react/http": "^1.6"
},
"require-dev": {
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.35"
},
"autoload": {
"psr-4": { "Clue\\React\\EventSource\\": "src/" }
"psr-4": {
"Clue\\React\\EventSource\\": "src/"
}
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\EventSource\\": "tests/" }
"psr-4": {
"Clue\\Tests\\React\\EventSource\\": "tests/"
}
}
}
9 changes: 7 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResult="false"
colors="true"
@@ -19,5 +19,10 @@
</coverage>
<php>
<ini name="error_reporting" value="-1" />
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
<!-- <ini name="zend.assertions" value="1" /> -->
<ini name="assert.active" value="1" />
<ini name="assert.exception" value="1" />
<ini name="assert.bail" value="0" />
</php>
</phpunit>
8 changes: 8 additions & 0 deletions phpunit.xml.legacy
Original file line number Diff line number Diff line change
@@ -15,4 +15,12 @@
<directory>./src/</directory>
</whitelist>
</filter>
<php>
<ini name="error_reporting" value="-1" />
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
<!-- <ini name="zend.assertions" value="1" /> -->
<ini name="assert.active" value="1" />
<ini name="assert.exception" value="1" />
<ini name="assert.bail" value="0" />
</php>
</phpunit>

0 comments on commit f156e70

Please sign in to comment.