Reputation: 3291
I want to generate coverhtml for my classes only currently I am using command like,
phpunit --coverage-html=../../coverage ../../test/assertion.php
but it is testing the code in the vendor folder as well.
Upvotes: 4
Views: 1803
Reputation: 11250
Using the XML file, you can include the directories you want to process, and exclude the ones you do not.
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".class">.</directory>
<directory suffix=".fn">.</directory>
<directory suffix=".php">.</directory>
<exclude>
<directory>ExternalLibraries</directory>
</exclude>
</whitelist>
</filter>
Upvotes: 2