gpt4 book ai didi

regex - 我如何在 phpunit 中执行 "starts with"正则表达式过滤器

转载 作者:行者123 更新时间:2023-12-02 08:48:31 24 4
gpt4 key购买 nike

我试过了phpunit --debug --filter/^complete/feed.php;

出于某种原因,它说 0 次测试。

如果我执行 phpunit --debug --filter/complete/feed.php; 它会命中任何带有“complete”一词的函数

最佳答案

那是因为测试的完全限定的$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)

关于regex - 我如何在 phpunit 中执行 "starts with"正则表达式过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10523700/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com