Commit 21219666 authored by catch's avatar catch
Browse files

Issue #3308987 by lauriii, Spokje, quietone, bnjmnm: Remove references to Stable

(cherry picked from commit 6c087ced)
parent 19200d5f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -112,13 +112,6 @@ public function getActiveThemeByName($theme_name) {
    while ($ancestor && isset($themes[$ancestor]->base_theme)) {
      $ancestor = $themes[$ancestor]->base_theme;
      if (!$this->themeHandler->themeExists($ancestor)) {
        if ($ancestor == 'stable') {
          // Themes that depend on Stable will be fixed by system_update_8014().
          // There is no harm in not adding it as an ancestor since at worst
          // some people might experience slight visual regressions on
          // update.php.
          continue;
        }
        throw new MissingThemeDependencyException(sprintf('Base theme %s has not been installed.', $ancestor), $ancestor);
      }
      $base_themes[] = $themes[$ancestor];
+1 −1
Original line number Diff line number Diff line
name: 'BigPipe test theme'
type: theme
base theme: stable
base theme: stable9
description: 'Theme for testing BigPipe edge cases.'
version: VERSION
+1 −1
Original line number Diff line number Diff line
name: '<"Cat" & ''Mouse''>'
type: theme
base theme: stable
base theme: stable9
description: 'Theme for testing special characters in block admin.'
regions:
  content: Content
+1 −1
Original line number Diff line number Diff line
name: 'Block test theme'
type: theme
base theme: stable
base theme: stable9
description: 'Theme for testing the block system'
version: VERSION
regions:
+9 −9
Original line number Diff line number Diff line
@@ -101,8 +101,8 @@ public function testBlockDemoUiPage() {
    $this->assertSession()->assertEscaped('<strong>Test theme</strong>');

    // Ensure that a hidden theme cannot use the block demo page.
    \Drupal::service('theme_installer')->install(['stable']);
    $this->drupalGet('admin/structure/block/demo/stable');
    \Drupal::service('theme_installer')->install(['stable9']);
    $this->drupalGet('admin/structure/block/demo/stable9');
    $this->assertSession()->statusCodeEquals(404);
  }

@@ -150,25 +150,25 @@ public function testBlockAdminUiPage() {
    $this->drupalPlaceBlock('local_tasks_block', ['region' => 'header', 'theme' => 'stark']);
    // We have to enable at least one extra theme that is not hidden so that
    // local tasks will show up. That's why we enable test_theme_theme.
    \Drupal::service('theme_installer')->install(['stable', 'test_theme_theme']);
    \Drupal::service('theme_installer')->install(['stable9', 'test_theme_theme']);
    $this->drupalGet('admin/structure/block');
    $theme_handler = \Drupal::service('theme_handler');
    $this->assertSession()->linkExists($theme_handler->getName('stark'));
    $this->assertSession()->linkExists($theme_handler->getName('test_theme_theme'));
    $this->assertSession()->linkNotExists($theme_handler->getName('stable'));
    $this->assertSession()->linkNotExists($theme_handler->getName('stable9'));

    // Ensure that a hidden theme cannot use the block demo page.
    $this->drupalGet('admin/structure/block/list/stable');
    $this->drupalGet('admin/structure/block/list/stable9');
    $this->assertSession()->statusCodeEquals(404);

    // Ensure that a hidden theme set as the admin theme can use the block demo
    // page.
    \Drupal::configFactory()->getEditable('system.theme')->set('admin', 'stable')->save();
    \Drupal::configFactory()->getEditable('system.theme')->set('admin', 'stable9')->save();
    \Drupal::service('router.builder')->rebuildIfNeeded();
    $this->drupalPlaceBlock('local_tasks_block', ['region' => 'header', 'theme' => 'stable']);
    $this->drupalPlaceBlock('local_tasks_block', ['region' => 'header', 'theme' => 'stable9']);
    $this->drupalGet('admin/structure/block');
    $this->assertSession()->linkExists($theme_handler->getName('stable'));
    $this->drupalGet('admin/structure/block/list/stable');
    $this->assertSession()->linkExists($theme_handler->getName('stable9'));
    $this->drupalGet('admin/structure/block/list/stable9');
    $this->assertSession()->statusCodeEquals(200);
  }

Loading