You are here

public function ProcessingTest::assertBatchMessages in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Batch/ProcessingTest.php \Drupal\Tests\system\Functional\Batch\ProcessingTest::assertBatchMessages()
  2. 9 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.

@internal

Parameters

$texts: Array of raw strings to look for.

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 228

Class

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

Namespace

Drupal\Tests\system\Functional\Batch

Code

public function assertBatchMessages(array $texts) : void {
  $pattern = '|' . implode('.*', $texts) . '|s';
  $this
    ->assertSession()
    ->responseMatches($pattern);
}