[フレーム]
Last Updated: February 25, 2016
·
22.23K
· n9ti

Add Code Coverage Report to Laravel Project

Insert this code to file "phpunit.xml" on the root of your project.

<logging>
 <log type="coverage-html" target="./report" charset="UTF-8"
 yui="true" highlight="true"
 lowUpperBound="50" highLowerBound="80" />
</logging>

and this is a final result :

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
 backupStaticAttributes="false"
 bootstrap="bootstrap/autoload.php"
 colors="true"
 convertErrorsToExceptions="true"
 convertNoticesToExceptions="true"
 convertWarningsToExceptions="true"
 processIsolation="false"
 stopOnFailure="false"
 syntaxCheck="true"
>
 <testsuites>
 <testsuite name="Application Test Suite">
 <directory>./app/tests/</directory>
 </testsuite>
 </testsuites>
 <filter>
 <blacklist>
 <directory suffix=".php">./vendor</directory>
 </blacklist>
 </filter>
 <logging>
 <log type="coverage-html" target="./report" charset="UTF-8"
 yui="true" highlight="true"
 lowUpperBound="50" highLowerBound="80" />
 </logging>
</phpunit>

Picture

Picture

AltStyle によって変換されたページ (->オリジナル) /