Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试过这个 phpunit --debug --filter /^complete/ feed.php;
phpunit --debug --filter /^complete/ feed.php;
出于某种原因,它说 0 个测试。
如果我这样做phpunit --debug --filter /complete/ feed.php;,它会使用“完成”这个词来命中任何功能
phpunit --debug --filter /complete/ feed.php;
那是因为$name测试的完全合格表示为Classname::testname
$name
Classname::testname
所以你需要使用::而不是^
::
^
像:
$ phpunit --filter /::testIs/ PHPUnit 3.6.10 by Sebastian Bergmann. Configuration read from /var/www/.../phpunit.xml .. Time: 1 second, Memory: 10.75Mb OK (2 tests, 4 assertions)