r/PHPhelp • u/trymeouteh • Sep 11 '25
PHPUnit: Code Coverage without phpunit.xml?
Is it possible to using only the command line to run a code coverage using PHPUnit and xdebug without having a phpunit.xml file to determine where the source code files are and where the tests are?
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
2
Upvotes
View all comments
Show parent comment
1
u/MateusAzevedo Sep 11 '25
To me, classic XY problem.