function HookInitTest::testThemeInitializationHookInit

Test that the theme system can generate output when called by hook_init().

File

drupal/core/modules/system/lib/Drupal/system/Tests/Theme/HookInitTest.php, line 35
Definition of Drupal\system\Tests\Theme\HookInitTest.

Class

HookInitTest
Functional test for initialization of the theme system in hook_init().

Namespace

Drupal\system\Tests\Theme

Code

function testThemeInitializationHookInit() {
  $this
    ->drupalGet('theme-test/hook-init');

  // Verify that themed output generated in hook_init() appears.
  $this
    ->assertRaw('Themed output generated in hook_init()');

  // Verify that the default theme's CSS still appears when the theme system
  // is initialized in hook_init().
  $this
    ->assertRaw('stark/css/layout.css');
}