diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index 557a05c..2e15bfe 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -249,8 +249,14 @@ function testAdministrationTheme() { * Test switching the default theme. */ function testSwitchDefaultTheme() { + /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ + $theme_handler = \Drupal::service('theme_handler'); + // First, Install Stark and set it as the default theme programmatically. + $theme_handler->install(array('stark')); + $theme_handler->setDefault('stark'); + // Install Bartik and set it as the default theme. - \Drupal::service('theme_handler')->install(array('bartik')); + $theme_handler->install(array('bartik')); $this->drupalGet('admin/appearance'); $this->clickLink(t('Set as default')); $this->assertEqual($this->config('system.theme')->get('default'), 'bartik'); @@ -260,10 +266,10 @@ 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'); - // Classy is the first 'Set as default' link. - $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('Classy(' . t('active tab') . ')', 'Default local task on blocks admin page has changed.'); + $this->assertText('Stark(' . t('active tab') . ')', 'Default local task on blocks admin page has changed.'); } /** @@ -322,8 +328,8 @@ function testUninstallingThemes() { // base theme of bartik. $this->assertNoRaw('Uninstall Classy theme', 'A link to uninstall the Classy theme does not appear on the theme settings page.'); - // Change the default theme to stark, stark is third in the list. - $this->clickLink(t('Set as default'), 2); + // Change the default theme to stark, stark is second in the list. + $this->clickLink(t('Set as default'), 1); // Check that bartik can be uninstalled now. $this->assertRaw('Uninstall Bartik theme', 'A link to uninstall the Bartik theme does appear on the theme settings page.'); diff --git a/core/themes/classy/classy.info.yml b/core/themes/classy/classy.info.yml index fb5cb3e..bd47945 100644 --- a/core/themes/classy/classy.info.yml +++ b/core/themes/classy/classy.info.yml @@ -5,6 +5,7 @@ package: Core version: VERSION core: 8.x base theme: false +hidden: true libraries: - classy/base diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index 687c434..960a683 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -5,3 +5,4 @@ package: Core version: VERSION core: 8.x base theme: false +hidden: true