X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Ftests%2FREADME.md;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FREADME.md;h=ac544d43d32f804f4ded2021af7626052c73aeee;hp=b86e0da667c3a6a4c772e5eeee2886adcd11dbd9;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/drush/drush/tests/README.md b/vendor/drush/drush/tests/README.md index b86e0da66..ac544d43d 100644 --- a/vendor/drush/drush/tests/README.md +++ b/vendor/drush/drush/tests/README.md @@ -4,26 +4,13 @@ high quality, our tests are run on every push by [Travis](https://travis-ci.org/ Usage -------- 1. Review the configuration settings in [tests/phpunit.xml.dist](phpunit.xml.dist). If customization is needed, copy to phpunit.xml and edit away. -1. Run unit tests: `unish.sh` +1. Build the Site Under Test: `unish.sut.php` +1. Run test suite: `unish.phpunit.php` Advanced usage --------- -- Run only tests matching a regex: `unish.sh --filter=testVersionString` -- Skip slow tests (usually those with network usage): `unish.sh --exclude-group slow` -- XML results: `unish.sh --filter=testVersionString --log-junit results.xml` -- Use an alternate version of Drupal: `UNISH_DRUPAL_MAJOR_VERSION=8 unish.sh ...` -- Skip teardown (to examine test sites after a failure): `UNISH_DIRTY=1 unish.sh ...` - -Reuse by Drush Commandfiles ------------ -Drush commandfiles are encouraged to ship with PHPUnit test cases that -extend UnitUnishTestCase and CommandUnishTestCase. In order to run -the tests, you have to point to the phpunit.xml file that used by Drush. -The devel project has a wrapper script which demonstrates this - -http://drupalcode.org/project/devel.git/blob/refs/heads/8.x-1.x:/run-tests-drush.sh - -Cache ------------ -In order to speed up test runs, Unish (the Drush testing class) caches built Drupal sites -and restores them as requested by tests. Once in while, you might need to clear this cache -by deleting the /drush-cache directory. +- Run only tests matching a regex: `unish.phpunit.php --filter=testVersionString` +- Skip slow tests (usually those with network usage): `unish.phpunit.php --exclude-group slow` +- XML results: `unish.phpunit.php --filter=testVersionString --log-junit results.xml` +- Build the SUT and run test suite (slower) - `unish.clean.php` +- Install the SUT in a given folder - `UNISH_TMP=/path/to/folder php unish.sut.php`