We are struggling to get desired results from the coverage report using phpunit.
Previously, we were only capturing code coverage for files that had unit tests associated with them (I believe this is the default setting When the whitelist is empty).
Now we would like to have a coverage report which includes our already tested files, along with one or two specific directories (which have files with 0% coverage). This should give us more realistic statistics.
We have used an xml configuration file to try and accomplish this:
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">php/lib/</directory>
</whitelist>
<blacklist>
<directory suffix=".php">/usr/share/php/SymfonyComponents/YAML</directory>
</blacklist>
</filter>
However, this config now only includes coverage report for that one specified directory in our whitelist. It is not capturing coverage for other files which we have written unit tests for.
How do I achieve a code coverage configuration which captures coverage for:
1) all files that already have unit tests associated with them
2) Other configurable directories