Commit 61941454 authored by alexpott's avatar alexpott

Issue #2795611 by GoZ: Provide a assertHeader legacy assertion

parent fdb87a94
......@@ -519,6 +519,21 @@ protected function assertCacheTag($expected_cache_tag) {
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag);
}
/**
* Checks that current response header equals value.
*
* @param string $name
* Name of header to assert.
* @param string $value
* Value of the header to assert
*
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use $this->assertSession()->responseHeaderEquals() instead.
*/
protected function assertHeader($name, $value) {
$this->assertSession()->responseHeaderEquals($name, $value);
}
/**
* Returns WebAssert object.
*
......
......@@ -1682,6 +1682,19 @@ protected function config($name) {
return $this->container->get('config.factory')->getEditable($name);
}
/**
* Returns all response headers.
*
* @return array
* The HTTP headers values.
*
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use $this->getSession()->getResponseHeaders() instead.
*/
protected function drupalGetHeaders() {
return $this->getSession()->getResponseHeaders();
}
/**
* Gets the value of an HTTP response header.
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment