function TitleResolverTest::testStaticTitleZero
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleResolverTest::testStaticTitleZero()
- 11.x core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleResolverTest::testStaticTitleZero()
Tests a static title of '0'.
See also
\Drupal\Core\Controller\TitleResolver::getTitle()
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ TitleResolverTest.php, line 78
Class
- TitleResolverTest
- @coversDefaultClass \Drupal\Core\Controller\TitleResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testStaticTitleZero() {
$request = new Request();
$route = new Route('/test-route', [
'_title' => '0',
'_title_context' => '0',
]);
$this->assertEquals(new TranslatableMarkup('0', [], [
'context' => '0',
], $this->translationManager), $this->titleResolver
->getTitle($request, $route));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.