function BatchProcessingTestCase::testBatchLargePercentage
7.x batch.test | BatchProcessingTestCase::testBatchLargePercentage() |
Test batches that return $context['finished'] > 1 do in fact complete. See http://drupal.org/node/600836
File
- drupal-7.x/
modules/ simpletest/ tests/ batch.test, line 144 - Tests for the Batch API.
Class
- BatchProcessingTestCase
- Tests for the Batch API.
Code
function testBatchLargePercentage() {
// Displaying the page triggers batch 5.
$this->drupalGet('batch-test/large-percentage');
$this->assertBatchMessages($this->_resultMessages(1), t('Batch for step 2 performed successfully.'));
$this->assertEqual(batch_test_stack(), $this->_resultStack('batch_5'), t('Execution order was correct.'));
$this->assertText('Redirection successful.', t('Redirection after batch execution is correct.'));
}