0

我有这个 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>

遵循这个答案:如何运行特定的 phpunit xml 测试套件? 在我的服务器中,我可以这样做:

./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 执行第一组。

非常感谢。

4

1 回答 1

1

我正在为某人发布分析器...

经过一些尝试和错误,我得到了解决方案:

build:
    nodes:
        analysis:
            project_setup:
                override:
                    - 'true'
            tests:
                override:
                    - php ./vendor/bin/phpunit --configuration phpunit.xml --testsuite scrutinizer

coding_style:
    php:
        indentation:
            general:
                use_tabs: true

一个简单的命令覆盖并删除“test:true”。不知道是否还删除了报价影响。

于 2018-06-19T22:55:46.460 回答