function ContentLengthTest::providerTestSetContentLengthHeader
Same name in this branch
- 11.x core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php \Drupal\Tests\Core\StackMiddleware\ContentLengthTest::providerTestSetContentLengthHeader()
Same name in other branches
- 10 core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php \Drupal\Tests\big_pipe\Unit\StackMiddleware\ContentLengthTest::providerTestSetContentLengthHeader()
- 10 core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php \Drupal\Tests\Core\StackMiddleware\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\StackMiddlewareCode
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.