You are here

protected function AssertLegacyTrait::assertHeader in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertHeader()

Checks that current response header equals value.

Parameters

string $name: Name of header to assert.

string $value: Value of the header to assert

Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderEquals() instead.

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 747

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertHeader($name, $value) {
  $this
    ->assertSession()
    ->responseHeaderEquals($name, $value);
}