public function CKEditor5StylesheetsTest::testExternalStylesheets in Drupal 10
Tests loading of theme's CKEditor 5 stylesheets defined in the .info file.
@dataProvider externalStylesheetsProvider
Parameters
string $theme: The machine name of the theme.
array $expected: The expected CKEditor 5 CSS paths from the theme.
File
- core/
modules/ ckeditor5/ tests/ src/ Kernel/ CKEditor5StylesheetsTest.php, line 37
Class
- CKEditor5StylesheetsTest
- Test the ckeditor5-stylesheets theme config property.
Namespace
Drupal\Tests\ckeditor5\KernelCode
public function testExternalStylesheets($theme, $expected) {
\Drupal::service('theme_installer')
->install([
$theme,
]);
$this
->config('system.theme')
->set('default', $theme)
->save();
$this
->assertSame($expected, _ckeditor5_theme_css($theme));
}