You are here

protected function HtmlResponseAttachmentsTest::assertTeapotHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php \Drupal\system\Tests\Render\HtmlResponseAttachmentsTest::assertTeapotHeaders()

Helper function to make assertions about added HTTP headers.

2 calls to HtmlResponseAttachmentsTest::assertTeapotHeaders()
HtmlResponseAttachmentsTest::testAttachments in core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php
Test rendering of ['#attached'].
HtmlResponseAttachmentsTest::testRenderCachedBlock in core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php
Test caching of ['#attached'].

File

core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php, line 92
Contains \Drupal\system\Tests\Render\HtmlResponseAttachmentsTest.

Class

HtmlResponseAttachmentsTest
Functional tests for HtmlResponseAttachmentsProcessor.

Namespace

Drupal\system\Tests\Render

Code

protected function assertTeapotHeaders() {
  $this
    ->assertHeader('X-Test-Teapot', 'Teapot Mode Active');
  $this
    ->assertHeader('X-Test-Teapot-Replace', 'Teapot replaced');
  $this
    ->assertHeader('X-Test-Teapot-No-Replace', 'This value is not replaced,This one is added');
}