public function ThemeTest::testThemeOnNonHtmlRequest in Drupal 8
Same name and namespace in other branches
- 9 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 65
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testThemeOnNonHtmlRequest() {
$this
->drupalGet('theme-test/non-html');
$json = Json::decode($this
->getSession()
->getPage()
->getContent());
$this
->assertFalse($json['theme_initialized']);
}