You are here

public function PageRenderTest::testHookPageAlter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Kernel/Common/PageRenderTest.php \Drupal\Tests\system\Kernel\Common\PageRenderTest::testHookPageAlter()

Tests hook_page_attachments_alter() exceptions.

File

core/modules/system/tests/src/Kernel/Common/PageRenderTest.php, line 27

Class

PageRenderTest
Test page rendering hooks.

Namespace

Drupal\Tests\system\Kernel\Common

Code

public function testHookPageAlter() {
  $this
    ->enableModules([
    'common_test',
    'system',
  ]);
  \Drupal::service('router.builder')
    ->rebuild();
  $this
    ->assertPageRenderHookExceptions('common_test', 'hook_page_attachments_alter');
}