PHPUnit没有运行目录

时间:2018-02-05 09:06:18

标签: php phpunit

我尝试从特定的测试目录运行所有测试,如下所示:

|-- Service
|   |-- Cla
|       |-- ClaService.php
|       |-- SubscriptionService.php
|-- Tests
    |-- Service
        |-- Cla
            |-- ClaServiceTest.php : tests for ClaService.php
            |-- SubscriptionServiceTest.php : tests for SubscriptionService.php

所以我尝试运行不从SubscriptionServiceTest.php运行任何测试的bin/phpunit --coverage-text Tests/Service/Cla/,你知道为什么吗?

这是phpunit.xml的摘录:

<testsuites>
    <testsuite name="Project Test Suite">
        <directory>./Tests</directory>
    </testsuite>
</testsuites>

<filter>
    <whitelist>
        <directory>./</directory>
        <exclude>
            <directory>./Resources</directory>
            <directory>./Tests</directory>
            <directory>./vendor</directory>
        </exclude>
    </whitelist>
</filter>

0 个答案:

没有答案