function TitleResolverTest::providerTestStaticTitleWithParameter

Same name in other branches
  1. 9 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

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),
        ],
    ];
}

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