function ThemeInstallerTest::testUninstallNotInstalled in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Extension/ThemeInstallerTest.php \Drupal\system\Tests\Extension\ThemeInstallerTest::testUninstallNotInstalled()
Tests uninstalling a theme that is not installed.
File
- core/
modules/ system/ src/ Tests/ Extension/ ThemeInstallerTest.php, line 292 - Contains \Drupal\system\Tests\Extension\ThemeInstallerTest.
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\system\Tests\ExtensionCode
function testUninstallNotInstalled() {
$name = 'test_basetheme';
try {
$message = 'ThemeHandler::uninstall() throws InvalidArgumentException upon uninstalling a theme that is not installed.';
$this
->themeInstaller()
->uninstall(array(
$name,
));
$this
->fail($message);
} catch (\InvalidArgumentException $e) {
$this
->pass(get_class($e) . ': ' . $e
->getMessage());
}
}