diff --git a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php index 3b1361d..aa069c5 100644 --- a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php @@ -86,6 +86,10 @@ function testStylesheets() { $this->assertIdentical(0, count($this->xpath("//link[contains(@href, 'sub-remove.css')]")), "sub-remove.css not found"); $this->assertIdentical(0, count($this->xpath("//link[contains(@href, 'base-add.sub-remove.css')]")), "base-add.sub-remove.css not found"); $this->assertIdentical(0, count($this->xpath("//link[contains(@href, 'base-override.sub-remove.css')]")), "base-override.sub-remove.css not found"); + + // Verify that CSS files with the same name are loaded from both the base theme and subtheme. + $this->assertIdentical(1, count($this->xpath("//link[contains(@href, '$base/samename.css')]")), "$base/samename.css found"); + $this->assertIdentical(1, count($this->xpath("//link[contains(@href, '$sub/samename.css')]")), "$sub/samename.css found"); } /** diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index 6737423..0cd4e4e 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -181,28 +181,6 @@ function testCSSOverride() { } /** - * Ensures that test theme loads an CSS file named same as in parent theme. It - * should load both files. - * - * @see test_theme.info.yml - * @see test_theme.libraries.yml - */ - function testCSSWithSameNameAsInParent() { - // Take off css preprocessing - $config = $this->config('system.performance'); - $config->set('css.preprocess', 0); - $config->save(); - - // Reuse the same page as in testPreprocessForSuggestions(). Request page - // and ensure that parent and test theme's same named CSS file gets loaded. - $this->drupalGet('theme-test/suggestion'); - $classy_layout_css_url = drupal_get_path('theme', 'classy') .'/css/layout.css'; - $theme_test_layout_css_url = drupal_get_path('theme', 'test_theme') .'/css/layout.css'; - $this->assertIdentical(1, count($this->xpath("//link[contains(@href, '" . $classy_layout_css_url . "')]")), $classy_layout_css_url . " found"); - $this->assertIdentical(1, count($this->xpath("//link[contains(@href, '" . $theme_test_layout_css_url . "')]")), $theme_test_layout_css_url . " found"); - } - - /** * Ensures a themes template is overrideable based on the 'template' filename. */ function testTemplateOverride() { diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml b/core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml index 1c72d30..49e4ba1 100644 --- a/core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml +++ b/core/modules/system/tests/themes/test_basetheme/test_basetheme.libraries.yml @@ -5,3 +5,4 @@ global-styling: base-add.css: {} base-add.sub-override.css: {} base-add.sub-remove.css: {} + samename.css: {} diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.libraries.yml b/core/modules/system/tests/themes/test_subtheme/test_subtheme.libraries.yml index efce7ae..931dffe 100644 --- a/core/modules/system/tests/themes/test_subtheme/test_subtheme.libraries.yml +++ b/core/modules/system/tests/themes/test_subtheme/test_subtheme.libraries.yml @@ -3,3 +3,4 @@ global-styling: css: base: css/sub-add.css: {} + css/samename.css: {} diff --git a/core/modules/system/tests/themes/test_theme/css/layout.css b/core/modules/system/tests/themes/test_theme/css/layout.css deleted file mode 100644 index db5765f..0000000 --- a/core/modules/system/tests/themes/test_theme/css/layout.css +++ /dev/null @@ -1,7 +0,0 @@ - -/** - * This file is for testing CSS file named same as in parent theme through - * *.libraries.yml file. - * Used in - * No contents are necessary. - */ diff --git a/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/core/modules/system/tests/themes/test_theme/test_theme.info.yml index 5000e74..9eebc90 100644 --- a/core/modules/system/tests/themes/test_theme/test_theme.info.yml +++ b/core/modules/system/tests/themes/test_theme/test_theme.info.yml @@ -14,8 +14,6 @@ description: 'Theme for testing the theme system' version: VERSION base theme: classy core: 8.x -libraries: - - test_theme/global-styling stylesheets-remove: - system.module.css regions: diff --git a/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml b/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml deleted file mode 100644 index ed21a2d..0000000 --- a/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml +++ /dev/null @@ -1,5 +0,0 @@ -global-styling: - version: VERSION - css: - theme: - css/layout.css: {}