function ThemeHookCollectorPassTest::testExceptionModule
Test exception with module parameter.
The module parameter is not allowed.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Hook/ ThemeHookCollectorPassTest.php, line 53
Class
Namespace
Drupal\KernelTests\Core\HookCode
public function testExceptionModule() : void {
$this->expectException(\LogicException::class);
$container = new ContainerBuilder();
$theme_filenames = [
'oop_hook_theme_with_module' => [
'pathname' => 'core/modules/system/tests/themes/HookCollector/oop_hook_theme_with_module/oop_hook_theme_with_module.info.yml',
],
];
$container->setParameter('container.themes', $theme_filenames);
$container->setParameter('preprocess_for_suggestions', []);
$container->setDefinition('theme.manager', new Definition());
(new ThemeHookCollectorPass())->process($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.