function TwigExtensionTest::setUpMockThemeManager
Reinitializes the theme manager as a mock object.
2 calls to TwigExtensionTest::setUpMockThemeManager()
- TwigExtensionTest::testActiveTheme in core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php - Tests the active_theme function.
- TwigExtensionTest::testActiveThemePath in core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php - Tests the active_theme_path function.
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php, line 129
Class
- TwigExtensionTest
- Tests the twig extension.
Namespace
Drupal\Tests\Core\TemplateCode
protected function setUpMockThemeManager() : void {
$this->themeManager = $this->createMock(ThemeManagerInterface::class);
$reflection = new \ReflectionProperty($this->systemUnderTest, 'themeManager');
$reflection->setValue($this->systemUnderTest, $this->themeManager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.