Skip to content

Commit

Permalink
Update config file for PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Nov 6, 2024
1 parent f813bc1 commit 188fe46
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: composer update --prefer-dist --no-progress

- name: Run test suite
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-filter src tests

- name: Run coding style check
run: ./vendor/bin/phpcs --standard=PSR1 src/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.phpunit.cache
.phpunit.result.cache
coveralls.json
composer.lock
Expand Down
45 changes: 30 additions & 15 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
shortenArraysForExportThreshold="10"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true">

<phpunit>
<testsuites>
<testsuite name="Map">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="coverage.xml"/>
</logging>
</phpunit>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>

<coverage>
<report>
<clover outputFile="coverage.xml"/>
</report>
</coverage>

<testsuites>
<testsuite name="Map">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 188fe46

Please sign in to comment.