diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index 6f35ca373072..613ab1b7bd95 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -91,7 +91,7 @@ function _ckeditor_theme_css($theme = NULL) { } } if (isset($info['base theme'])) { - $css = array_merge(_ckeditor_theme_css($info['base theme'], $css)); + $css = array_merge(_ckeditor_theme_css($info['base theme']), $css); } } return $css; diff --git a/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php index 46390a4a2099..9133ee00512e 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php @@ -262,7 +262,11 @@ class CKEditorTest extends KernelTestBase { $expected[] = file_create_url('core/modules/ckeditor/tests/modules/ckeditor_test.css'); $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a hook_ckeditor_css_alter() implementation exists.'); - // @todo test coverage for _ckeditor_theme_css(), by including a custom theme in this test with a "ckeditor_stylesheets" entry in its .info file. + // Enable the Bartik theme, which specifies a CKEditor stylesheet. + \Drupal::service('theme_handler')->install(['bartik']); + \Drupal::config('system.theme')->set('default', 'bartik'); + $expected[] = file_create_url('core/themes/bartik/css/ckeditor-iframe.css'); + $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a theme providing a CKEditor stylesheet exists.'); } /**