public function BaseThemeRequiredTest::testWildWest in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php \Drupal\KernelTests\Core\Theme\BaseThemeRequiredTest::testWildWest()
Tests opting out of Stable by setting the base theme to false.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ BaseThemeRequiredTest.php, line 46
Class
- BaseThemeRequiredTest
- Tests the behavior of the `base theme` key.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testWildWest() {
$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
->assertTrue(empty($base_themes), 'No base theme is set when a theme has opted out of using Stable.');
}