function RendererLegacyTest::testHeaderAttributes

Tests deprecation of the drupal_http_header_attributes() function.

@dataProvider providerAttributes

@expectedDeprecation drupal_http_header_attributes() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes() instead. See https://www.drupal.org/node/3000051

File

core/tests/Drupal/KernelTests/Core/Render/RendererLegacyTest.php, line 23

Class

RendererLegacyTest
Deprecation tests cases for the render layer.

Namespace

Drupal\KernelTests\Core\Render

Code

public function testHeaderAttributes($expected, $attributes) {
    $this->assertSame($expected, drupal_http_header_attributes($attributes));
    $this->assertSame($expected, HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes($attributes));
}

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