我尝试从特定的测试目录运行所有测试,如下所示:
|-- 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>