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. 'command-hook' => 'completetest_noop',
  24. );
  25. }
  26. $items['aaaaaaaard']['arguments'] = array('name' => 'Name');
  27. $items['aaaaaaaard']['options'] = array(
  28. 'ears' => 'Ears',
  29. 'eyes' => 'Eyes',
  30. 'nose' => 'Nose',
  31. 'legs' => 'Legs',
  32. );
  33. return $items;
  34. }
  35. function drush_completetest_noop() {
  36. // No-op.
  37. }
  38. /**
  39. * Command argument complete callback.
  40. *
  41. * @return
  42. * Array of completions.
  43. */
  44. function completetest_completetest_noop_complete() {
  45. return array(
  46. 'values' => array(
  47. 'aardvark',
  48. 'aardwolf',
  49. 'zebra',
  50. ),
  51. );
  52. }