function BaseThemeRequiredTest::testWildWest
Tests opting out of Stable 9 by setting the base theme to false.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Theme/ BaseThemeRequiredTest.php, line 48  
Class
- BaseThemeRequiredTest
 - Tests the behavior of the `base theme` key.
 
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testWildWest() : void {
  $this->themeInstaller
    ->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->getBaseThemeExtensions();
  $this->assertEmpty($base_themes, 'No base theme is set when a theme has opted out of using Stable 9.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.