function BrowserTestBase::drupalGetHeaders

Returns all response headers.

Return value

array The HTTP headers values.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use $this->getSession()->getResponseHeaders() instead.

See also

https://www.drupal.org/node/3067207

1 call to BrowserTestBase::drupalGetHeaders()
BrowserTestBaseLegacyTest::testDrupalGetHeaders in core/tests/Drupal/FunctionalTests/BrowserTestBaseLegacyTest.php
Test ::drupalGetHeaders().

File

core/tests/Drupal/Tests/BrowserTestBase.php, line 663

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\Tests

Code

protected function drupalGetHeaders() {
    @trigger_error('Drupal\\Tests\\BrowserTestBase::drupalGetHeaders() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use $this->getSession()->getResponseHeaders() instead. See https://www.drupal.org/node/3067207', E_USER_DEPRECATED);
    return $this->getSession()
        ->getResponseHeaders();
}

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