【发布时间】:2011-12-26 14:57:13
【问题描述】:
我的 PHPUnit 测试环境设置为针对 ZF 项目运行。并且从一个地方运行得很好。但是当我将所有项目文件(通过 git clone)移动到另一个地方时,phpunit 运行,但返回“OK(0 个测试,0 个断言)”,虽然确实有几个测试。
相同的过程在 2 个不同的位置运行良好,直到我手动将 phpunit 从 3.6.5 降级到 3.4.15(这对于 ZF 项目来说似乎是不可避免的)。不知道出了什么问题?或者如果我可以检查来自 phpunit 的任何执行日志?
我的 phpunit.xml
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuites>
<testsuite name="myTests">
<directory>./</directory>
</testsuite>
</testsuites>
<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>
</filter>
</phpunit>
出来了:
Sebastian Bergmann 的 PHPUnit 3.4.15。
时间:0 秒,内存:9.50Mb
OK(0 个测试,0 个断言)
扩展位置:
Sebastian Bergmann 的 PHPUnit 3.4.15。
.....
时间:0 秒,内存:30.75Mb
OK(5 个测试,11 个断言)
【问题讨论】:
标签: php zend-framework phpunit