public function BaseThemeMissingTest::testMissingBaseThemeException in Drupal 9
Tests exception is thrown.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ BaseThemeMissingTest.php, line 70
Class
- BaseThemeMissingTest
- Tests the behavior of a theme when base_theme info key is missing.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testMissingBaseThemeException() {
$this->container
->get('extension.list.theme')
->setExtensionDiscovery(new ExtensionDiscovery('vfs://core'));
$this
->expectException(InfoParserException::class);
$this
->expectExceptionMessage('Missing required key ("base theme") in themes/test_missing_base_theme/test_missing_base_theme.info.yml, see https://www.drupal.org/node/3066038');
$this->themeInstaller
->install([
'test_missing_base_theme',
]);
}