protected function HtmlResponseAttachmentsTest::assertTeapotHeaders in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php \Drupal\Tests\system\Functional\Render\HtmlResponseAttachmentsTest::assertTeapotHeaders()
Helper function to make assertions about added HTTP headers.
2 calls to HtmlResponseAttachmentsTest::assertTeapotHeaders()
- HtmlResponseAttachmentsTest::testAttachments in core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php - Test rendering of ['#attached'].
- HtmlResponseAttachmentsTest::testRenderCachedBlock in core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php - Test caching of ['#attached'].
File
- core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php, line 100
Class
- HtmlResponseAttachmentsTest
- Functional tests for HtmlResponseAttachmentsProcessor.
Namespace
Drupal\Tests\system\Functional\RenderCode
protected function assertTeapotHeaders() {
$headers = $this
->getSession()
->getResponseHeaders();
$this
->assertEquals($headers['X-Test-Teapot'], [
'Teapot Mode Active',
]);
$this
->assertEquals($headers['X-Test-Teapot-Replace'], [
'Teapot replaced',
]);
$this
->assertEquals($headers['X-Test-Teapot-No-Replace'], [
'This value is not replaced',
'This one is added',
]);
}