function TitleResolverTest::providerTestDynamicTitle

Data provider for testDynamicTitle.

File

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

Class

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

Namespace

Drupal\Tests\Core\Controller

Code

public static function providerTestDynamicTitle() : array {
  return [
    [
      'test value',
      'test value',
    ],
    [
      '',
      NULL,
    ],
    [
      new TranslatableMarkup('static title'),
      new TranslatableMarkup('static title'),
    ],
    // phpcs:disable Drupal.Semantics.FunctionT.EmptyString
[
      new TranslatableMarkup(''),
      NULL,
    ],
    // phpcs:enable
[
      [
        '#markup' => '<span>Title</span>',
      ],
      [
        '#markup' => '<span>Title</span>',
      ],
    ],
  ];
}

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