我使用以下方法为WordPress插件创建了单元测试:
first()
现在,当我在这些测试中运行PHPUnit时,我会在测试开始运行之前看到几条消息。
wp scaffold plugin-tests my-plugin
有没有办法隐藏这些消息?我只想看看测试结果:
$ phpunit -c path/to/phpunit.xml.dist
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 6.5.8 by Sebastian Bergmann and contributors.
...
我已尝试使用$ phpunit -c path/to/phpunit.xml.dist
. 1 / 1 (100%)
Time: 2.44 seconds, Memory: 12.00MB
OK (1 test, 1 assertion)
标记,希望不同的输出格式不包含这些消息,但它们仍会显示。我也尝试将输出汇总到--testdox
,但在我的所有测试完成之前,我都没有开始看到结果。