protected function LinkGeneratorTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 71
Class
- LinkGeneratorTest
- @coversDefaultClass \Drupal\Core\Utility\LinkGenerator @group Utility
Namespace
Drupal\Tests\Core\UtilityCode
protected function setUp() : void {
parent::setUp();
$this->urlGenerator = $this
->getMockBuilder('\\Drupal\\Core\\Routing\\UrlGenerator')
->disableOriginalConstructor()
->getMock();
$this->moduleHandler = $this
->createMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
$this->renderer = $this
->createMock('\\Drupal\\Core\\Render\\RendererInterface');
$this->linkGenerator = new LinkGenerator($this->urlGenerator, $this->moduleHandler, $this->renderer);
$this->urlAssembler = $this
->createMock('\\Drupal\\Core\\Utility\\UnroutedUrlAssemblerInterface');
}