To set a default test suite in PHPUnit, add the defaultTestSuite attribute to the phpunit tag in the phpunit.xml file
. Be sure its value corresponds to a test suite later in the file.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
defaultTestSuite="unit"
>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">tests/Unit</directory>
</testsuite>
</testsuites>
</phpunit>
Now, to run the default test suite, just run phpunit
without arguments:
phpunit
See the this Stack Overflow discussion for discussion.