[英]phpunit only throwing fatal errors if test is specified with filter
phpunit .
results in failed tests 导致测试失败
phpunit MyFileTest.php
results in failed tests 导致测试失败
phpunit --filter testSomething MyFileTest.php
results in a fatal error that should have been caught with the prior methods of running the test. 会导致致命错误,该错误应该已经在运行测试的现有方法中发现。
phpunit: 3.7.7 的PHPUnit:3.7.7
php: 5.3.10 的PHP:5.3.10
any idea why? 知道为什么吗?
Without seeing the code, or even the error message, it's really hard to help you. 如果没有看到代码,甚至没有错误消息,真的很难为您提供帮助。
You probably have some dependencies that are loaded in previous tests, and that are not there when running the single test. 您可能有一些依赖项在以前的测试中加载,而在运行单个测试时则不存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.