Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1.22 KB

README.md

File metadata and controls

26 lines (21 loc) · 1.22 KB

Drush's test suite (aka Unish) is based on PHPUnit. In order to maintain high quality, our tests are run on every push.

Usage

  1. Review the configuration settings in tests/phpunit.xml.dist. If customization is needed, copy to phpunit.xml and edit away.
  2. Run test suite: composer test

Docker

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.

Advanced usage

  • 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