function drush_unit_batch

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

Command callback.

File

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

Code

function drush_unit_batch() {
  // Reduce php memory/time limits to test backend respawn.
  // TODO.

  $batch = array(
    'operations' => array(
      array('_drush_unit_batch_operation', array()),
    ),
    'finished' => '_drush_unit_batch_finished',
    // 'file' => Doesn't work for us. Drupal 7 enforces this path // to be relative to DRUPAL_ROOT. // @see _batch_process().
  );
  batch_set($batch);
  drush_backend_batch_process();

  // Print the batch output.
  drush_backend_output();
}