public function ThemeInstallerTest::testInstallNameTooLong in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstallNameTooLong()
- 10 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testInstallNameTooLong()
Tests installing a theme with a too long name.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ ThemeInstallerTest.php, line 129
Class
- ThemeInstallerTest
- Tests installing and uninstalling of themes.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testInstallNameTooLong() {
$name = 'test_theme_having_veery_long_name_which_is_too_long';
try {
$message = 'ThemeInstaller::install() throws ExtensionNameLengthException upon installing a theme with a too long name.';
$this
->themeInstaller()
->install([
$name,
]);
$this
->fail($message);
} catch (\Exception $e) {
$this
->assertInstanceOf(ExtensionNameLengthException::class, $e);
}
}