public function ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies in Drupal 9
Same name and namespace in other branches
- 8 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()
Tests installing a theme with unmet module dependencies.
@dataProvider providerTestInstallThemeWithUnmetModuleDependencies
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 147
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,
]);
}