public function CKEditorStylesheetsWarningTest::installThemeThatTriggersWarning in Drupal 10
Installs and enables themes for testing.
Parameters
string $theme: The theme to enable.
File
- core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditorStylesheetsWarningTest.php, line 28
Class
- CKEditorStylesheetsWarningTest
- Tests warnings when ckeditor_stylesheets do not have CKEditor 5 equivalents.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
public function installThemeThatTriggersWarning($theme) {
$theme_installer = \Drupal::service('theme_installer');
$theme_installer
->install([
$theme,
]);
$this
->config('system.theme')
->set('default', $theme)
->save();
$theme_installer
->install([
'stark',
]);
$this
->config('system.theme')
->set('admin', 'stark')
->save();
\Drupal::service('theme_handler')
->refreshInfo();
}