function ProcessingTest::assertBatchMessages

Same name and namespace in other branches
  1. 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.

@internal

Parameters

$texts: Array of raw strings to look for.

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);
}

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