You are here

function ProcessingTest::testBatchLargePercentage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Batch/ProcessingTest.php \Drupal\system\Tests\Batch\ProcessingTest::testBatchLargePercentage()

Tests batches that return $context['finished'] > 1 do in fact complete.

See also

https://www.drupal.org/node/600836

File

core/modules/system/src/Tests/Batch/ProcessingTest.php, line 168
Contains \Drupal\system\Tests\Batch\ProcessingTest.

Class

ProcessingTest
Tests batch processing in form and non-form workflow.

Namespace

Drupal\system\Tests\Batch

Code

function testBatchLargePercentage() {

  // Displaying the page triggers batch 5.
  $this
    ->drupalGet('batch-test/large-percentage');
  $this
    ->assertBatchMessages($this
    ->_resultMessages('batch_5'), 'Batch for step 2 performed successfully.');
  $this
    ->assertEqual(batch_test_stack(), $this
    ->_resultStack('batch_5'), 'Execution order was correct.');
  $this
    ->assertText('Redirection successful.', 'Redirection after batch execution is correct.');
}