protected function OffCanvasTestBase::enableTheme in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::enableTheme()
- 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::enableTheme()
Enables a theme.
Parameters
string $theme: The theme.
File
- core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTestBase.php, line 61
Class
- OffCanvasTestBase
- Base class contains common test functionality for the Off-canvas dialog.
Namespace
Drupal\Tests\system\FunctionalJavascriptCode
protected function enableTheme($theme) {
// Enable the theme.
\Drupal::service('theme_installer')
->install([
$theme,
]);
$theme_config = \Drupal::configFactory()
->getEditable('system.theme');
$theme_config
->set('default', $theme);
$theme_config
->save();
}