You are here

public function BrowserTestBaseTest::testDrupalGetHeader in Drupal 9

Tests legacy drupalGetHeader().

@group legacy

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 954

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testDrupalGetHeader() {
  $this
    ->expectDeprecation('BrowserTestBase::drupalGetHeader() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getResponseHeader() instead. See https://www.drupal.org/node/3168383');
  $this
    ->drupalGet('test-page');
  $this
    ->drupalGetHeader('Content-Type');
}