function ProcessingTest::assertBatchMessages

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Batch/ProcessingTest.php \Drupal\Tests\system\Functional\Batch\ProcessingTest::assertBatchMessages()
  2. 10 core/modules/system/tests/src/Functional/Batch/ProcessingTest.php \Drupal\Tests\system\Functional\Batch\ProcessingTest::assertBatchMessages()
  3. 11.x core/modules/system/tests/src/Functional/Batch/ProcessingTest.php \Drupal\Tests\system\Functional\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/tests/src/Functional/Batch/ProcessingTest.php
Tests batches defined in a form submit handler.
ProcessingTest::testBatchFormMultipleBatches in core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
Tests batches defined in different submit handlers on the same form.
ProcessingTest::testBatchFormMultistep in core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
Tests batches defined in a multistep form.
ProcessingTest::testBatchFormProgrammatic in core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
Tests batches defined in a programmatically submitted form.
ProcessingTest::testBatchLargePercentage in core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
Tests batches that return $context['finished'] > 1 do in fact complete.

... See full list

File

core/modules/system/tests/src/Functional/Batch/ProcessingTest.php, line 222

Class

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

Namespace

Drupal\Tests\system\Functional\Batch

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.