You are here

function batch_test_stack in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/batch_test/batch_test.module \batch_test_stack()
  2. 9 core/modules/system/tests/modules/batch_test/batch_test.module \batch_test_stack()

Helper function: store or retrieve traced execution data.

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

... See full list

File

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);
}