You are here

public function BatchBuilderTest::testSetProgressMessage in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetProgressMessage()
  2. 9 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetProgressMessage()

Tests setProgressMessage().

@covers ::setProgressMessage

File

core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php, line 91

Class

BatchBuilderTest
Tests for the batch builder class.

Namespace

Drupal\Tests\Core\Batch

Code

public function testSetProgressMessage() {
  $batch = (new BatchBuilder())
    ->setProgressMessage(new TranslatableMarkup('Batch in progress...'))
    ->toArray();
  $this
    ->assertEquals(new TranslatableMarkup('Batch in progress...'), $batch['progress_message']);
}