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