Drush's test suite (aka Unish) is based on PHPUnit. In order to maintain high quality, our tests are run on every push.
- Review the configuration settings in tests/phpunit.xml.dist. If customization is needed, copy to phpunit.xml and edit away.
- Run test suite:
composer test
Drush's own tests may be run within provided Docker containers (see docker-compose.yml):
- Start containers:
docker-compose up -d
- Run a test:
docker-compose exec php composer functional -- --filter testVersionString
- To change configuration, copy .env.example to .env, edit to taste, and run
docker-compose up -d
again - See that .env.example file for help on enabling Xdebug.
- Run only tests matching a regex:
composer functional -- --filter testVersionString
- Skip slow tests (usually those with network usage):
composer functional -- --exclude-group slow
- XML results:
composer functional -- --log-junit results.xml