You are here

protected function BrowserTestBase::drupalGetHeaders in Drupal 8

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();
}