function ThemeSettingsTest::testDefaultConfig
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php \Drupal\KernelTests\Core\Theme\ThemeSettingsTest::testDefaultConfig()
- 8.9.x core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php \Drupal\KernelTests\Core\Theme\ThemeSettingsTest::testDefaultConfig()
- 11.x core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php \Drupal\KernelTests\Core\Theme\ThemeSettingsTest::testDefaultConfig()
Tests that $theme.settings are imported and used as default theme settings.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeSettingsTest.php, line 47
Class
- ThemeSettingsTest
- Tests theme settings functionality.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testDefaultConfig() : void {
$name = 'test_basetheme';
$path = $this->availableThemes[$name]
->getPath();
$this->assertFileExists("{$path}/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/{$name}.settings.yml");
$this->container
->get('theme_installer')
->install([
$name,
]);
$this->assertSame('only', theme_get_setting('base', $name));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.