Skip to content

Commit

Permalink
Update PHPUnit configuration schema for PHPUnit 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonFrings committed Aug 13, 2020
1 parent 86eac25 commit 40c86b5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/examples/ export-ignore
/phpunit.xml.dist export-ignore
/phpunit.xml export-ignore
/phpunit-legacy.xml export-ignore
/tests/ export-ignore
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ install:
- composer install

script:
- vendor/bin/phpunit --coverage-text
- if [[ "$TRAVIS_PHP_VERSION" > "7.2" ]]; then vendor/bin/phpunit --coverage-text; fi
- if [[ "$TRAVIS_PHP_VERSION" < "7.3" ]]; then vendor/bin/phpunit --coverage-text -c phpunit-legacy.xml; fi
6 changes: 5 additions & 1 deletion phpunit.xml.dist → phpunit-legacy.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="vendor/autoload.php" colors="true" cacheResult="false">
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Flux test suite">
<directory>./tests/</directory>
Expand Down
19 changes: 19 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheResult="false">
<testsuites>
<testsuite name="Flux test suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory>./src/</directory>
</include>
</coverage>
</phpunit>

0 comments on commit 40c86b5

Please sign in to comment.