function HtmlResponseAttachmentsTest::assertTeapotHeaders
Same name in other branches
- 8.9.x core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php \Drupal\Tests\system\Functional\Render\HtmlResponseAttachmentsTest::assertTeapotHeaders()
- 10 core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php \Drupal\Tests\system\Functional\Render\HtmlResponseAttachmentsTest::assertTeapotHeaders()
- 11.x 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.
@internal
2 calls to HtmlResponseAttachmentsTest::assertTeapotHeaders()
- HtmlResponseAttachmentsTest::testAttachments in core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php - Tests rendering of ['#attached'].
- HtmlResponseAttachmentsTest::testRenderCachedBlock in core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php - Tests caching of ['#attached'].
File
-
core/
modules/ system/ tests/ src/ Functional/ Render/ HtmlResponseAttachmentsTest.php, line 107
Class
- HtmlResponseAttachmentsTest
- Functional tests for HtmlResponseAttachmentsProcessor.
Namespace
Drupal\Tests\system\Functional\RenderCode
protected function assertTeapotHeaders() : void {
$this->assertSession()
->responseHeaderEquals('X-Test-Teapot', 'Teapot Mode Active');
$this->assertSession()
->responseHeaderEquals('X-Test-Teapot-Replace', 'Teapot replaced');
$this->assertSession()
->responseHeaderEquals('X-Test-Teapot-No-Replace', 'This value is not replaced');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.