function batch_test_stack

7.x batch_test.module batch_test_stack($data = NULL, $reset = FALSE)

Helper function: store or retrieve traced execution data.

23 calls to batch_test_stack()
BatchPageTestCase::testBatchProgressPageTheme in drupal/modules/simpletest/tests/batch.test
Tests that the batch API progress page uses the correct theme.
BatchProcessingTestCase::testBatchForm in drupal/modules/simpletest/tests/batch.test
Test batches defined in a form submit handler.
BatchProcessingTestCase::testBatchFormMultipleBatches in drupal/modules/simpletest/tests/batch.test
Test batches defined in different submit handlers on the same form.
BatchProcessingTestCase::testBatchFormMultistep in drupal/modules/simpletest/tests/batch.test
Test batches defined in a multistep form.
BatchProcessingTestCase::testBatchFormProgrammatic in drupal/modules/simpletest/tests/batch.test
Test batches defined in a programmatically submitted form.

... See full list

File

drupal/modules/simpletest/tests/batch_test.module, line 503
Helper module for the Batch API tests.

Code

function batch_test_stack($data = NULL, $reset = FALSE) {
  if ($reset) {
    variable_del('batch_test_stack');
  }
  if (!isset($data)) {
    return variable_get('batch_test_stack', array());
  }
  $stack = variable_get('batch_test_stack', array());
  $stack[] = $data;
  variable_set('batch_test_stack', $stack);
}