function TitleResolverTest::testEmptyStringStaticTitle

Tests an empty string static title.

See also

\Drupal\Core\Controller\TitleResolver::getTitle()

File

core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php, line 77

Class

TitleResolverTest
@coversDefaultClass \Drupal\Core\Controller\TitleResolver[[api-linebreak]] @group Controller

Namespace

Drupal\Tests\Core\Controller

Code

public function testEmptyStringStaticTitle() : void {
  $request = new Request();
  $route = new Route('/test-route', [
    '_title' => '',
  ]);
  $this->assertNull($this->titleResolver
    ->getTitle($request, $route));
}

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