Phpunit generates html coverage report for specific folder only

I want to create coverhtml for my classes only for now. I use the like command

    phpunit --coverage-html=../../coverage ../../test/assertion.php

but it also checks the code in the provider folder.

+3
source share
1 answer

Using an XML file, you can include directories that you want to process and exclude those that you do not use.

<filter>
    <whitelist processUncoveredFilesFromWhitelist="true">
        <directory suffix=".class">.</directory>
        <directory suffix=".fn">.</directory>
        <directory suffix=".php">.</directory>
        <exclude>
            <directory>ExternalLibraries</directory>
        </exclude>
    </whitelist>
</filter>
+2
source

All Articles