I'm using PHP 5.6.24 with PHPUnit 5.5.4 and XDebug 2.4.1 and I reach a code coverage of 0,83%. However, before I was using PHP 5.6.0 with PHPUnit 4.7.7 and XDebug 2.3.3 and reached a code coverage of more than 84%.
I found out that since PHP 5.5.x you need to have a phpunit.xml with a whitelist configured. This was new for me, so I added the following file:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./</directory>
<file></file>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="../results/report" lowUpperBound="35" highLowerBound="70"/>
</logging>
<testsuites>
<testsuite name="DTS">
<directory>./</directory>
</testsuite>
</testsuites>
</phpunit>
The unit tests still work. When I run them by command line I still see that all tests are executed successfully, but it's just the code coverage report which has such odd result.