function RegistryTest::setupTheme
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Theme/RegistryTest.php \Drupal\Tests\Core\Theme\RegistryTest::setupTheme()
1 call to RegistryTest::setupTheme()
- RegistryTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ RegistryTest.php, line 496
Class
- RegistryTest
- @coversDefaultClass \Drupal\Core\Theme\Registry @group Theme
Namespace
Drupal\Tests\Core\ThemeCode
protected function setupTheme() {
$this->registry = $this->getMockBuilder(Registry::class)
->onlyMethods([
'getPath',
])
->setConstructorArgs([
$this->root,
$this->cache,
$this->lock,
$this->moduleHandler,
$this->themeHandler,
$this->themeInitialization,
$this->runtimeCache,
$this->moduleList,
])
->getMock();
$this->registry
->expects($this->any())
->method('getPath')
->willReturnCallback(function ($module) {
if ($module == 'theme_test') {
return 'core/modules/system/tests/modules/theme_test';
}
});
$this->registry
->setThemeManager($this->themeManager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.