function ThemeHookCollectorPassTest::testExceptionReorder
Test exception with reorder attribute.
ReorderHook attribute is not allowed.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Hook/ ThemeHookCollectorPassTest.php, line 91
Class
Namespace
Drupal\KernelTests\Core\HookCode
public function testExceptionReorder() : void {
$this->expectException(\LogicException::class);
$container = new ContainerBuilder();
$theme_filenames = [
'oop_hook_theme_with_reorder' => [
'pathname' => 'core/modules/system/tests/themes/HookCollector/oop_hook_theme_with_reorder/oop_hook_theme_with_reorder.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.