function ThemeInstallerTest::testInstall
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstall()
- 10 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstall()
- 11.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstall()
Tests installing a theme.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 61
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testInstall() {
$name = 'test_basetheme';
$themes = $this->themeHandler()
->listInfo();
$this->assertFalse(isset($themes[$name]));
$this->themeInstaller()
->install([
$name,
]);
$this->assertIdentical($this->extensionConfig()
->get("theme.{$name}"), 0);
$themes = $this->themeHandler()
->listInfo();
$this->assertTrue(isset($themes[$name]));
$this->assertEqual($themes[$name]->getName(), $name);
// Verify that test_basetheme.settings is active.
$this->assertIdentical(theme_get_setting('features.favicon', $name), FALSE);
$this->assertEqual(theme_get_setting('base', $name), 'only');
$this->assertEqual(theme_get_setting('override', $name), 'base');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.