我学习单元测试的绳索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>
任何人之前遇到这样的? 什么是那么容易出现问题的?