You are here

function ProcessingTest::assertBatchMessages 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::assertBatchMessages()

Triggers a pass if the texts were found in order in the raw content.

Parameters

$texts: Array of raw strings to look for .

$message: Message to display.

Return value

TRUE on pass, FALSE on fail.

7 calls to ProcessingTest::assertBatchMessages()
ProcessingTest::testBatchForm in core/modules/system/src/Tests/Batch/ProcessingTest.php
Tests batches defined in a form submit handler.
ProcessingTest::testBatchFormMultipleBatches in core/modules/system/src/Tests/Batch/ProcessingTest.php
Tests batches defined in different submit handlers on the same form.
ProcessingTest::testBatchFormMultistep in core/modules/system/src/Tests/Batch/ProcessingTest.php
Tests batches defined in a multistep form.
ProcessingTest::testBatchFormProgrammatic in core/modules/system/src/Tests/Batch/ProcessingTest.php
Tests batches defined in a programmatically submitted form.
ProcessingTest::testBatchLargePercentage in core/modules/system/src/Tests/Batch/ProcessingTest.php
Tests batches that return $context['finished'] > 1 do in fact complete.

... See full list

File

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

Class

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

Namespace

Drupal\system\Tests\Batch

Code

function assertBatchMessages($texts, $message) {
  $pattern = '|' . implode('.*', $texts) . '|s';
  return $this
    ->assertPattern($pattern, $message);
}