You are here

public function ThemeTest::testThemeOnNonHtmlRequest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Theme/ThemeTest.php \Drupal\system\Tests\Theme\ThemeTest::testThemeOnNonHtmlRequest()

Ensures that non-HTML requests never initialize themes.

File

core/modules/system/src/Tests/Theme/ThemeTest.php, line 141
Contains \Drupal\system\Tests\Theme\ThemeTest.

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\system\Tests\Theme

Code

public function testThemeOnNonHtmlRequest() {
  $this
    ->drupalGet('theme-test/non-html');
  $json = Json::decode($this
    ->getRawContent());
  $this
    ->assertFalse($json['theme_initialized']);
}