function BigPipeTest::assertBigPipeResponseHeadersPresent

Same name in other branches
  1. 9 core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertBigPipeResponseHeadersPresent()
  2. 8.9.x core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertBigPipeResponseHeadersPresent()
  3. 11.x core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertBigPipeResponseHeadersPresent()

@internal

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 332

Class

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

Namespace

Drupal\Tests\big_pipe\Functional

Code

protected function assertBigPipeResponseHeadersPresent() : void {
    // Check that Cache-Control header set to "private".
    $this->assertSession()
        ->responseHeaderContains('Cache-Control', 'private');
    $this->assertSession()
        ->responseHeaderEquals('Surrogate-Control', 'no-store, content="BigPipe/1.0"');
    $this->assertSession()
        ->responseHeaderEquals('X-Accel-Buffering', 'no');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.