drupal-civicrm/vendor/drush/drush/tests
Theodotos Andreou c6e2478c40 First commit 2018-01-14 13:10:16 +00:00
..
Drush/Tests/Make/Parser First commit 2018-01-14 13:10:16 +00:00
Unish First commit 2018-01-14 13:10:16 +00:00
hooks/magic_help_alter First commit 2018-01-14 13:10:16 +00:00
makefiles First commit 2018-01-14 13:10:16 +00:00
resources First commit 2018-01-14 13:10:16 +00:00
COVERAGE.txt First commit 2018-01-14 13:10:16 +00:00
README.md First commit 2018-01-14 13:10:16 +00:00
annotatedCommandTest.php First commit 2018-01-14 13:10:16 +00:00
archiveDumpTest.php First commit 2018-01-14 13:10:16 +00:00
backendTest.php First commit 2018-01-14 13:10:16 +00:00
backendUnitTest.php First commit 2018-01-14 13:10:16 +00:00
batchTest.php First commit 2018-01-14 13:10:16 +00:00
bootstrap.inc First commit 2018-01-14 13:10:16 +00:00
cacheCommandTest.php First commit 2018-01-14 13:10:16 +00:00
commandSpecificTest.php First commit 2018-01-14 13:10:16 +00:00
commandTest.php First commit 2018-01-14 13:10:16 +00:00
commandUnitTest.php First commit 2018-01-14 13:10:16 +00:00
completeTest.php First commit 2018-01-14 13:10:16 +00:00
completetest.drush.inc First commit 2018-01-14 13:10:16 +00:00
completetestsite.drush.inc First commit 2018-01-14 13:10:16 +00:00
configPulltest.php First commit 2018-01-14 13:10:16 +00:00
configTest.php First commit 2018-01-14 13:10:16 +00:00
contextTest.php First commit 2018-01-14 13:10:16 +00:00
coreTest.php First commit 2018-01-14 13:10:16 +00:00
devel.xml First commit 2018-01-14 13:10:16 +00:00
drushScriptTest.php First commit 2018-01-14 13:10:16 +00:00
expandWildcardTablesUnitTest.php First commit 2018-01-14 13:10:16 +00:00
fieldTest.php First commit 2018-01-14 13:10:16 +00:00
filesystemTest.php First commit 2018-01-14 13:10:16 +00:00
generateMakeTest.php First commit 2018-01-14 13:10:16 +00:00
imageTest.php First commit 2018-01-14 13:10:16 +00:00
initCommandTest.php First commit 2018-01-14 13:10:16 +00:00
lockMakeTest.php First commit 2018-01-14 13:10:16 +00:00
makeConvertTest.php First commit 2018-01-14 13:10:16 +00:00
makeTest.php First commit 2018-01-14 13:10:16 +00:00
outputFormatUnitTest.php First commit 2018-01-14 13:10:16 +00:00
phpunit.xml.dist First commit 2018-01-14 13:10:16 +00:00
pmDownloadTest.php First commit 2018-01-14 13:10:16 +00:00
pmEnDisUnListInfoTest.php First commit 2018-01-14 13:10:16 +00:00
pmReleaseNotesTest.php First commit 2018-01-14 13:10:16 +00:00
pmRequestTest.php First commit 2018-01-14 13:10:16 +00:00
pmRequestUnitTest.php First commit 2018-01-14 13:10:16 +00:00
pmUpdateCodeTest.php First commit 2018-01-14 13:10:16 +00:00
pmUpdateStatusTest.php First commit 2018-01-14 13:10:16 +00:00
queueTest.php First commit 2018-01-14 13:10:16 +00:00
quickDrupalTest.php First commit 2018-01-14 13:10:16 +00:00
releaseInfoTest.php First commit 2018-01-14 13:10:16 +00:00
roleTest.php First commit 2018-01-14 13:10:16 +00:00
shellAliasTest.php First commit 2018-01-14 13:10:16 +00:00
siteAliasTest.php First commit 2018-01-14 13:10:16 +00:00
siteAliasUnitTest.php First commit 2018-01-14 13:10:16 +00:00
siteIntallD6Test.php First commit 2018-01-14 13:10:16 +00:00
siteSetTest.php First commit 2018-01-14 13:10:16 +00:00
siteSetUnitTest.php First commit 2018-01-14 13:10:16 +00:00
siteSshTest.php First commit 2018-01-14 13:10:16 +00:00
sqlConnectCreateTest.php First commit 2018-01-14 13:10:16 +00:00
sqlDumpTest.php First commit 2018-01-14 13:10:16 +00:00
sqlSyncTest.php First commit 2018-01-14 13:10:16 +00:00
tablesUnitTest.php First commit 2018-01-14 13:10:16 +00:00
testChildren.sh First commit 2018-01-14 13:10:16 +00:00
unit.drush.inc First commit 2018-01-14 13:10:16 +00:00
userTest.php First commit 2018-01-14 13:10:16 +00:00
variableTest.php First commit 2018-01-14 13:10:16 +00:00
watchdogTest.php First commit 2018-01-14 13:10:16 +00:00
xhUnitTest.php First commit 2018-01-14 13:10:16 +00:00

README.md

Drush's test suite is based on PHPUnit. In order to maintain high quality, our tests are run on every push by Travis

Usage

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

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.