diff --git a/core/modules/system/src/Tests/Common/PageRenderTest.php b/core/modules/system/src/Tests/Common/PageRenderTest.php index bb2def2..b76c969 100644 --- a/core/modules/system/src/Tests/Common/PageRenderTest.php +++ b/core/modules/system/src/Tests/Common/PageRenderTest.php @@ -54,6 +54,9 @@ function assertPageRenderHookExceptions($module, $hook) { $page = []; $html_renderer->invokePageAttachmentHooks($page); + // Assert that hooks can set cache tags. + $this->assertEqual($page['#cache']['tags'], ['example']); + // Assert an invalid hook implementation doesn't trigger an exception. \Drupal::state()->set($module . '.' . $hook . '.descendant_attached', TRUE); $assertion = $hook . '() implementation that sets #attached on a descendant triggers an exception';