function _batch_test_callback_5

Performs a simple batch operation.

1 string reference to '_batch_test_callback_5'
_batch_test_batch_5 in drupal/core/modules/system/tests/modules/batch_test/batch_test.module
Batch 5: Repeats a simple operation.

File

drupal/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc, line 57
Batch callbacks for the Batch API tests.

Code

function _batch_test_callback_5($id, $sleep, &$context) {

  // No-op, but ensure the batch take a couple iterations.
  // Batch needs time to run for the test, so sleep a bit.
  usleep($sleep);

  // Track execution, and store some result for post-processing in the
  // 'finished' callback.
  batch_test_stack("op 5 id {$id}");
  $context['results'][5][] = $id;

  // This test is to test finished > 1
  $context['finished'] = 3.14;
}