public function ThemeInstallerTest::testUninstallNotInstalled in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testUninstallNotInstalled()
Tests uninstalling a theme that is not installed.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 362
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testUninstallNotInstalled() {
$name = 'test_basetheme';
try {
$message = 'ThemeInstaller::uninstall() throws UnknownExtensionException upon uninstalling a theme that is not installed.';
$this
->themeInstaller()
->uninstall([
$name,
]);
$this
->fail($message);
} catch (\Exception $e) {
$this
->assertInstanceOf(UnknownExtensionException::class, $e);
}
}