I am learning the ropes with Unit testing Zend Framework
applications. So far I have set up PHPUnit
to work with Zend Framework
and have started writing some simple Test Cases.
My issue is that I am wondering why Code Coverage
does not work in spite of being set in the logging tag in my phpunit.xml
.
I don't get any error but no coverage report is generated.
However it works when I run phpunit --coverage <dir>
The logging section of my phpunit is as below:
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuite name="CI Test Suite">
<directory>./</directory>
</testsuite>
<testsuite name="Library Test Suite">
<directory>./library</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../application/</directory>
<exclude>
<directory suffix=".phtml">../application</directory>
<file>../application/Bootstrap.php</file>
<file>../application/controllers/ErrorController.php</file>
</exclude>
</whitelist>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8" yui="true"
highlight="true" lowUpperBound="50" highLowerBound="80" />
<log type="testdox" target="./log/testdox.html" />
</logging>
</filter>
</phpunit>
Anyone encounter this before? What is then likely problem?