completetest.drush.inc

  1. 8.0.x tests/completetest.drush.inc
  2. 6.x tests/completetest.drush.inc
  3. 7.x tests/completetest.drush.inc
  4. 5.x tests/completetest.drush.inc
  5. master tests/completetest.drush.inc

Commands and options for complete unit tests, to avoid relying on the ever-changing core command set.

Functions

Namesort descending Description
completetest_completetest_noop_complete Command argument complete callback.
completetest_drush_command Implementation of hook_drush_command().
drush_completetest_noop

File

tests/completetest.drush.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Commands and options for complete unit tests, to avoid relying on the
  5. * ever-changing core command set.
  6. */
  7. /**
  8. * Implementation of hook_drush_command().
  9. */
  10. function completetest_drush_command() {
  11. $commands = array(
  12. 'aaaaaaaard',
  13. 'aaaaaaaard-ant',
  14. 'aaaaaaaard-vark',
  15. 'aaaaaaaard-wolf',
  16. 'zzzzzzzzebra',
  17. );
  18. foreach ($commands as $command) {
  19. $items[$command] = array(
  20. 'description' => 'No-op command, used to test various completions for commands that start the same as other commands.',
  21. 'bootstrap' => DRUSH_BOOTSTRAP_NONE,
  22. 'callback' => 'drush_completetest_noop',
  23. );
  24. }
  25. $items['aaaaaaaard']['arguments'] = array('name' => 'Name');
  26. $items['aaaaaaaard']['options'] = array(
  27. 'ears' => 'Ears',
  28. 'eyes' => 'Eyes',
  29. 'nose' => 'Nose',
  30. 'legs' => 'Legs',
  31. );
  32. return $items;
  33. }
  34. function drush_completetest_noop() {
  35. // No-op.
  36. }
  37. /**
  38. * Command argument complete callback.
  39. *
  40. * @return
  41. * Array of completions.
  42. */
  43. function completetest_completetest_noop_complete() {
  44. return array(
  45. 'values' => array(
  46. 'aardvark',
  47. 'aardwolf',
  48. 'zebra',
  49. ),
  50. );
  51. }