function RegistryTest::setUpMockThemeManager
Reinitializes the theme manager as a mock object.
1 call to RegistryTest::setUpMockThemeManager()
- RegistryTest::testGetRegistryForModule in core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php - Tests getting the theme registry defined by a module.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php, line 146
Class
Namespace
Drupal\Tests\Core\ThemeCode
protected function setUpMockThemeManager() : void {
$this->themeManager = $this->createMock(ThemeManagerInterface::class);
$reflection = new \ReflectionProperty($this->registry, 'themeManager');
$reflection->setValue($this->registry, $this->themeManager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.