PHPUnit 代码覆盖率显示单元测试的代码覆盖率?
我正在使用 Michael Romer 出色的 ZF-Boilerplate,但在测试时遇到了障碍。
当我查看代码覆盖率报告时,它仅显示实际单元测试的代码覆盖率,而不显示正在测试的代码。
我到处寻找发生这种情况的实例,但找不到任何东西。据我所知, phpunit.xml (https ://github.com/michael-romer/zf-boilerplate/blob/master/tests/phpunit.xml)文件已正确配置目录结构(https://github.com/michael-romer/zf-boilerplate)
有没有人可以看看为什么它不起作用?
I'm using Michael Romer's fantastic ZF-Boilerplate and have hit a snag when testing.
When I view the code coverage reports, it only shows the code coverage for the actual unit tests, not for the code being tested.
I've looked high and low for instances of this happening, but can't find anything. As far as I can see, the phpunit.xml (https://github.com/michael-romer/zf-boilerplate/blob/master/tests/phpunit.xml) file is configured correctly for the directory structure (https://github.com/michael-romer/zf-boilerplate)
Is there anyone that can see why it's not working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
典型的......我发布几分钟后我就明白了。我将 phpunit.xml 移至一个目录,修改其中的路径以反映这一点,然后再次尝试,它按预期工作。
Typical... a couple minutes after I posted I figured it out. I moved the phpunit.xml up a directory, modified the paths inside it to relfect this, and tried again, and it worked as expected.