You are here

public function TitleResolverTest::providerTestStaticTitleWithParameter in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleResolverTest::providerTestStaticTitleWithParameter()

File

core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php, line 97
Contains \Drupal\Tests\Core\Controller\TitleResolverTest.

Class

TitleResolverTest
@coversDefaultClass \Drupal\Core\Controller\TitleResolver @group Controller

Namespace

Drupal\Tests\Core\Controller

Code

public function providerTestStaticTitleWithParameter() {
  $translation_manager = $this
    ->createMock('\\Drupal\\Core\\StringTranslation\\TranslationInterface');
  return [
    [
      'static title @test',
      new TranslatableMarkup('static title @test', [
        '@test' => 'value',
        '%test' => 'value',
        '@test2' => 'value2',
        '%test2' => 'value2',
      ], [], $translation_manager),
    ],
    [
      'static title %test',
      new TranslatableMarkup('static title %test', [
        '@test' => 'value',
        '%test' => 'value',
        '@test2' => 'value2',
        '%test2' => 'value2',
      ], [], $translation_manager),
    ],
  ];
}