function TitleResolverTest::setUp

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

Overrides UnitTestCase::setUp

File

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

Class

TitleResolverTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Controller%21TitleResolver.php/class/TitleResolver/9" title="Provides the default implementation of the title resolver interface." class="local">\Drupal\Core\Controller\TitleResolver</a> @group Controller

Namespace

Drupal\Tests\Core\Controller

Code

protected function setUp() : void {
    $this->controllerResolver = $this->createMock('\\Drupal\\Core\\Controller\\ControllerResolverInterface');
    $this->translationManager = $this->createMock('\\Drupal\\Core\\StringTranslation\\TranslationInterface');
    $this->argumentResolver = $this->createMock('\\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface');
    $this->titleResolver = new TitleResolver($this->controllerResolver, $this->translationManager, $this->argumentResolver);
}

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