function TitleResolverTest::providerTestStaticTitleWithParameter

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

File

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

Class

TitleResolverTest
@coversDefaultClass \Drupal\Core\Controller\TitleResolver[[api-linebreak]] @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),
    ],
  ];
}

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