我正在学习单元测试Zend Framework
应用程序的技巧。到目前为止,我已经开始PHPUnit
使用Zend Framework
并开始编写一些简单的测试用例。
我的问题是我想知道为什么Code Coverage
尽管在我的phpunit.xml
.
我没有收到任何错误,但没有生成覆盖率报告。
但是当我跑步时它会起作用phpunit --coverage <dir>
我的 phpunit 的日志记录部分如下:
<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>
有人遇到过这种情况吗?那么可能的问题是什么?