1 batch.test BatchProcessingTestCase::testBackdropFormSubmitInBatch()

Test that backdrop_form_submit() can run within a batch operation.

File

core/modules/simpletest/tests/batch.test, line 129
Tests for the Batch API.

Class

BatchProcessingTestCase
Tests for the Batch API.

Code

function testBackdropFormSubmitInBatch() {
  // Displaying the page triggers a batch that programmatically submits a
  // form.
  $value = 'sample-value-from-menu';
  $this->backdropGet('batch-test/nested-programmatic/' . $value);
  $this->assertEqual(batch_test_stack(), array('mock form submitted with value = ' . $value), t('backdrop_form_submit() ran successfully within a batch operation.'));
}