function ThemeInstallerTest::testInstallThemeWithUnmetModuleDependencies
Tests installing a theme with unmet module dependencies.
@dataProvider providerTestInstallThemeWithUnmetModuleDependencies
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 177
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testInstallThemeWithUnmetModuleDependencies($theme_name, $installed_modules, $message) : void {
$this->moduleInstaller()
->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.