From 41fce63b995d604aac2ebbe9c1f2649531be3dd9 Mon Sep 17 00:00:00 2001
From: Dries <dries@buytaert.net>
Date: Thu, 2 Oct 2014 10:43:37 +0200
Subject: [PATCH] Issue #2329501 by alexpott, mdrummond, davidhernandez |
 Cottser: Add classy.info.yml to core, set Classy as base theme for Bartik and
 Seven.

---
 core/modules/config/src/Tests/ConfigImportUITest.php | 2 ++
 core/modules/system/src/Tests/System/ThemeTest.php   | 3 ++-
 core/themes/bartik/bartik.info.yml                   | 1 +
 core/themes/classy/classy.info.yml                   | 6 ++++++
 core/themes/seven/seven.info.yml                     | 1 +
 5 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 core/themes/classy/classy.info.yml

diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index 959b2f189951..d4c4c9d3a7c2 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -72,6 +72,8 @@ function testImport() {
     $core_extension['module']['action'] = 0;
     $core_extension['module']['ban'] = 0;
     $core_extension['module'] = module_config_sort($core_extension['module']);
+    // Bartik is a subtheme of classy so classy must be enabled.
+    $core_extension['theme']['classy'] = 0;
     $core_extension['theme']['bartik'] = 0;
     $staging->write('core.extension', $core_extension);
 
diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php
index 80a3c43bf265..e1b091db6685 100644
--- a/core/modules/system/src/Tests/System/ThemeTest.php
+++ b/core/modules/system/src/Tests/System/ThemeTest.php
@@ -251,7 +251,8 @@ function testSwitchDefaultTheme() {
     $this->assertText('Bartik(' . t('active tab') . ')', 'Default local task on blocks admin page is the default theme.');
     // Switch back to Stark and test again to test that the menu cache is cleared.
     $this->drupalGet('admin/appearance');
-    $this->clickLink(t('Set as default'), 0);
+    // Stark is the second 'Set as default' link.
+    $this->clickLink(t('Set as default'), 1);
     $this->drupalGet('admin/structure/block');
     $this->assertText('Stark(' . t('active tab') . ')', 'Default local task on blocks admin page has changed.');
   }
diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml
index 48e1715e6f4b..22e62b47d834 100644
--- a/core/themes/bartik/bartik.info.yml
+++ b/core/themes/bartik/bartik.info.yml
@@ -1,5 +1,6 @@
 name: Bartik
 type: theme
+base theme: classy
 description: 'A flexible, recolorable theme with many regions and a responsive, mobile-first layout.'
 package: Core
 version: VERSION
diff --git a/core/themes/classy/classy.info.yml b/core/themes/classy/classy.info.yml
new file mode 100644
index 000000000000..d557b48c5000
--- /dev/null
+++ b/core/themes/classy/classy.info.yml
@@ -0,0 +1,6 @@
+name: Classy
+type: theme
+description: 'A base theme with sensible default CSS classes added. Learn how to use Classy as a base theme in the <a href="https://www.drupal.org/theme-guide/8">Drupal 8 Theming Guide</a>.'
+package: Core
+version: VERSION
+core: 8.x
diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml
index a382df49e0c2..2357e5e93661 100644
--- a/core/themes/seven/seven.info.yml
+++ b/core/themes/seven/seven.info.yml
@@ -1,5 +1,6 @@
 name: Seven
 type: theme
+base theme: classy
 description: 'The default administration theme for Drupal 8 was designed with clean lines, simple blocks, and sans-serif font to emphasize the tools and tasks at hand.'
 alt text: 'Default administration theme for Drupal 8 with simple blocks and clean lines.'
 tags: 'multi-column, fluid, responsive, sans-serif, accessible'
-- 
GitLab