I have xdebug running and in mode xdebug.mode=develop,coverage
. I checked this with phpinfo()
and got:
Xdebug:
Development Helpers ✔ enabled
Coverage ✔ enabled
I can run my tests, they work. If i do something stupid in my code, i get approppiate behaviour from the tests, so it is executed.
However, I get 0% code coverage, every line in my code is red (except the tests, they’re not marked).
This is my current configuration.xml:
<?xml version="1.0"?>
<phpunit colors="true" bootstrap="bootstrap.php" stopOnDefect="false">
<php>
<ini name="xdebug.mode" value="develop,coverage"/>
</php>
<source>
<include>
<directory suffix=".php">../_src</directory>
<directory suffix=".php">../_test</directory>
</include>T
<exclude>
<directory suffix=".php">../vendor</directory>
</exclude>
</source>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">../_src</directory>
<directory suffix=".php">../_test</directory>
</include>
<exclude>
<directory suffix=".php">../vendor</directory>
</exclude>
<report>
<clover outputFile="../_reports/clover.xml"/>
<cobertura outputFile="../_reports/cobertura.xml"/>
<crap4j outputFile="../_reports/crap4j.xml" threshold="50"/>
<html outputDirectory="../_reports/html-coverage" lowUpperBound="50" highLowerBound="90"/>
<php outputFile="../_reports/coverage.php"/>
<text outputFile="../_reports/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<xml outputDirectory="../_reports/xml-coverage"/>
</report>
</coverage>
<logging>
<junit outputFile="../_reports/junit.xml"/>
<teamcity outputFile="../_reports/teamcity.txt"/>
<testdoxHtml outputFile="../_reports/testdox.html"/>
<testdoxText outputFile="../_reports/testdox.txt"/>
</logging>
</phpunit>
Can someone tell me what is possibly going wrong here…?