function BatchBuilderTest::testSetInitMessage
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetInitMessage()
- 10 core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetInitMessage()
- 11.x core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php \Drupal\Tests\Core\Batch\BatchBuilderTest::testSetInitMessage()
Tests setInitMessage().
@covers ::setInitMessage
File
-
core/
tests/ Drupal/ Tests/ Core/ Batch/ BatchBuilderTest.php, line 78
Class
- BatchBuilderTest
- Tests for the batch builder class.
Namespace
Drupal\Tests\Core\BatchCode
public function testSetInitMessage() {
$batch = (new BatchBuilder())->setInitMessage(new TranslatableMarkup('New initialization message.'))
->toArray();
$this->assertEquals(new TranslatableMarkup('New initialization message.'), $batch['init_message']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.