function unit_drush_command

8.0.x unit.drush.inc unit_drush_command()
6.x unit.drush.inc unit_drush_command()
7.x unit.drush.inc unit_drush_command()
4.x unit.drush.inc unit_drush_command()
5.x unit.drush.inc unit_drush_command()
master unit.drush.inc unit_drush_command()

Implementation of hook_drush_command().

File

tests/unit.drush.inc, line 11
Commands which are useful for unit tests.

Code

function unit_drush_command() {
  $items['unit'] = array(
    'description' => 'No-op command, used to test completion for commands that start the same as other commands.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
  );
  $items['unit-eval'] = array(
    'description' => 'Works like php-eval. Used for testing $command_specific context.',
    'bootstrap' => DRUSH_BOOTSTRAP_MAX,
    'callback' => 'drush_core_php_eval',
  );
  $items['unit-invoke'] = array(
    'description' => 'Return an array indicating which invoke hooks got called.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
    'callback' => 'drush_unit_invoke_primary',
  );
  $items['unit-batch'] = array(
    'description' => 'Run a batch process.',
    'bootstrap' => DRUSH_BOOTSTRAP_MAX,
  );
  $items['unit-return-options'] = array(
    'description' => 'Return options as function result.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
  );
  $items['unit-return-argv'] = array(
    'description' => 'Return original argv as function result.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
  );
  $items['missing-callback'] = array(
    'description' => 'Command with no callback function, to test error reporting.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
  );
  $items['unit-drush-dependency'] = array(
    'description' => 'Command depending on an unknown commandfile.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
    'drush dependencies' => array('unknown-commandfile'),
  );
  return $items;
}