You are here

protected function LinkGeneratorTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php \Drupal\Tests\Core\Utility\LinkGeneratorTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php, line 74
Contains \Drupal\Tests\Core\Utility\LinkGeneratorTest.

Class

LinkGeneratorTest
@coversDefaultClass \Drupal\Core\Utility\LinkGenerator @group Utility

Namespace

Drupal\Tests\Core\Utility

Code

protected function setUp() {
  parent::setUp();
  $this->urlGenerator = $this
    ->getMock('\\Drupal\\Core\\Routing\\UrlGenerator', array(), array(), '', FALSE);
  $this->moduleHandler = $this
    ->getMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $this->renderer = $this
    ->getMock('\\Drupal\\Core\\Render\\RendererInterface');
  $this->linkGenerator = new LinkGenerator($this->urlGenerator, $this->moduleHandler, $this->renderer);
  $this->urlAssembler = $this
    ->getMock('\\Drupal\\Core\\Utility\\UnroutedUrlAssemblerInterface');
}