You are here

public function StableThemeTest::testWildWest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Theme/StableThemeTest.php \Drupal\system\Tests\Theme\StableThemeTest::testWildWest()

Tests opting out of Stable by setting the base theme to false.

File

core/modules/system/src/Tests/Theme/StableThemeTest.php, line 66
Contains \Drupal\system\Tests\Theme\StableThemeTest.

Class

StableThemeTest
Tests the behavior of the Stable theme.

Namespace

Drupal\system\Tests\Theme

Code

public function testWildWest() {
  $this->themeHandler
    ->install([
    'test_wild_west',
  ]);
  $this
    ->config('system.theme')
    ->set('default', 'test_wild_west')
    ->save();
  $theme = $this->themeManager
    ->getActiveTheme();

  /** @var \Drupal\Core\Theme\ActiveTheme $base_theme */
  $base_themes = $theme
    ->getBaseThemes();
  $this
    ->assertTrue(empty($base_themes), 'No base theme is set when a theme has opted out of using Stable.');
}