function ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies
Same name in other branches
- 8.9.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies()
- 10 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies()
- 11.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies()
Tests installing a theme with unmet module dependencies.
@dataProvider providerTestInstallThemeWithUnmetModuleDependencies
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 150
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testInstallThemeWithUnmetModuleDependencies($theme_name, $installed_modules, $message) {
$this->container
->get('module_installer')
->install($installed_modules);
$themes = $this->themeHandler()
->listInfo();
$this->assertEmpty($themes);
$this->expectException(MissingDependencyException::class);
$this->expectExceptionMessage($message);
$this->themeInstaller()
->install([
$theme_name,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.