PHPUnit在哪里写clover.xml?

时间:2014-09-30 22:01:17

标签: php phpunit

假设我将以下命令传递给PHPUnit:

phpunit tests --coverage-clover build/logs/clover.xml

我可以去哪里查看实际的 clover.xml 文件?我到处寻找,但我找不到它。我也找不到 / build / logs 目录。

我的测试运行正常,因为我看到以下输出:Tests: 1, Assertions: 1, Failures: 1.

1 个答案:

答案 0 :(得分:0)

您传递的路径:build / logs / clover.xml在执行phpunit时相对于当前目录(因为它不以/开头)。

如果您希望路径为/build/logs/clover.xml,只需将斜杠添加到命令参数:

phpunit tests --coverage-clover /build/logs/clover.xml