add test coverage config

This commit is contained in:
sunxyw 2022-03-28 20:09:44 +08:00 committed by Jerry Ma
parent c6bbba6051
commit 2e127771ed
2 changed files with 9 additions and 4 deletions

View File

@ -55,7 +55,8 @@
"autoload-dev": {
"psr-4": {
"Module\\": "src/Module",
"Custom\\": "src/Custom"
"Custom\\": "src/Custom",
"ZM\\Tests\\": "tests"
}
},
"bin": [
@ -91,6 +92,6 @@
],
"analyse": "phpstan analyse --memory-limit 300M -l 0 ./src",
"cs-fix": "php-cs-fixer fix $1",
"test": "bin/phpunit-swoole"
"test": "bin/phpunit-swoole --no-coverage"
}
}

View File

@ -18,12 +18,16 @@
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<coverage>
<include>
<directory suffix=".php">./src/ZM</directory>
</include>
<report>
<html outputDirectory="./build/html-coverage"/>
<clover outputFile="./build/coverage.xml"/>
</report>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
</php>
</phpunit>
</phpunit>