function ThemeTest::testThemeOnNonHtmlRequest
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testThemeOnNonHtmlRequest()
- 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testThemeOnNonHtmlRequest()
- 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testThemeOnNonHtmlRequest()
Ensures that non-HTML requests never initialize themes.
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ ThemeTest.php, line 67
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testThemeOnNonHtmlRequest() : void {
$this->drupalGet('theme-test/non-html');
$json = Json::decode($this->getSession()
->getPage()
->getContent());
$this->assertFalse($json['theme_initialized']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.