function RegistryTest::setUpMockModuleHandler
Reinitializes the module handler as a mock object.
2 calls to RegistryTest::setUpMockModuleHandler()
- RegistryTest::testGetRegistryForModule in core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php - Tests getting the theme registry defined by a module.
- RegistryTest::testPostProcessExtension in core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php - Tests post process extension.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php, line 128
Class
Namespace
Drupal\Tests\Core\ThemeCode
protected function setUpMockModuleHandler() : void {
$this->moduleHandler = $this->createMock(ModuleHandlerInterface::class);
$reflection = new \ReflectionProperty($this->registry, 'moduleHandler');
$reflection->setValue($this->registry, $this->moduleHandler);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.