function LinkGeneratorTest::setUpMockModuleHandler
Reinitializes the module handler as a mock object.
8 calls to LinkGeneratorTest::setUpMockModuleHandler()
- LinkGeneratorTest::testGenerate in core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php - Tests the generate() method with a route.
- LinkGeneratorTest::testGenerateActive in core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php - Tests the active class on the link method.
- LinkGeneratorTest::testGenerateButton in core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php - Tests the generate() method with the <button> route.
- LinkGeneratorTest::testGenerateExternal in core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php - Tests the generate() method with an external URL.
- LinkGeneratorTest::testGenerateHrefs in core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php - Tests the link method with certain hrefs.
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php, line 86
Class
Namespace
Drupal\Tests\Core\UtilityCode
protected function setUpMockModuleHandler() : void {
$this->moduleHandler = $this->createMock(ModuleHandlerInterface::class);
$reflection = new \ReflectionProperty($this->linkGenerator, 'moduleHandler');
$reflection->setValue($this->linkGenerator, $this->moduleHandler);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.