【发布时间】:2018-11-28 23:22:11
【问题描述】:
我有这个 phpunit.xml 文件:
<phpunit>
<testsuites>
<testsuite name="domoticz-api">
<directory suffix="Test.php">tests</directory>
</testsuite>
<testsuite name="scrutinizer">
<file>tests/Domoticzapi4Scrutinizer/ClientTest.php</file>
</testsuite>
</testsuites>
</phpunit>
按照这个答案:How to run a specific phpunit xml testsuite? 在我的服务器中我可以做到:
./vendor/bin/phpunit --configuration phpunit.xml --testsuite scrutinizer
进行测试。其他测试(主要测试)有几个原因我想从审查员中排除。
所以,在审查器的配置文件中,我有:
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
- command: 'php ./vendor/bin/phpunit --configuration phpunit.xml --testsuite scrutinizer'
tests: true
coding_style:
php:
indentation:
general:
use_tabs: true
但不幸的是,Scrutinizer 尝试执行失败的第一组测试 (domoticz-api)。
我也尝试过不使用单引号,配置已验证但 Scrutinizer 执行第一组。
非常感谢。
【问题讨论】:
标签: php phpunit scrutinizer