My PHPUnit configuration file has two test suites, unit
and system
. When I run the test runner vendor/bin/phpunit
, it runs all tests in both suites. I can target a single suite with the testsuite
flag: vendor/bin/phpunit --testsuite unit
, but I need to configure the test runner to run only the unit
suite by default, and to run integration
only when specifically called with the testsuite flag.
My configuration:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<testsuites>
<testsuite name="unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="integration">
<directory>tests/Integration</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/clover.xml"/>
</logging>
</phpunit>