You are here

protected function BigPipeTest::assertBigPipeResponseHeadersPresent in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertBigPipeResponseHeadersPresent()
2 calls to BigPipeTest::assertBigPipeResponseHeadersPresent()
BigPipeTest::testBigPipe in core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
Tests BigPipe-delivered HTML responses when JavaScript is enabled.
BigPipeTest::testBigPipeNoJs in core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
Tests BigPipe-delivered HTML responses when JavaScript is disabled.

File

core/modules/big_pipe/tests/src/Functional/BigPipeTest.php, line 327

Class

BigPipeTest
Tests BigPipe's no-JS detection & response delivery (with and without JS).

Namespace

Drupal\Tests\big_pipe\Functional

Code

protected function assertBigPipeResponseHeadersPresent() {

  // Check that Cache-Control header set to "private".
  $this
    ->assertSession()
    ->responseHeaderContains('Cache-Control', 'private');
  $this
    ->assertEqual('no-store, content="BigPipe/1.0"', $this
    ->drupalGetHeader('Surrogate-Control'));
  $this
    ->assertEqual('no', $this
    ->drupalGetHeader('X-Accel-Buffering'));
}