function ContentLengthTest::providerTestSetContentLengthHeader

File

core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php, line 40

Class

ContentLengthTest
Defines a test for ContentLength middleware.

Namespace

Drupal\Tests\big_pipe\Unit\StackMiddleware

Code

public static function providerTestSetContentLengthHeader() {
  $response = new Response('Test content', 200);
  $response->headers
    ->set('Content-Length', (string) strlen('Test content'));
  return [
    '200 ok' => [
      12,
      $response,
    ],
    'Big pipe' => [
      FALSE,
      new BigPipeResponse(new HtmlResponse('Test content')),
    ],
  ];
}

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