You are here

public function WebAssert::responseHeaderNotContains in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::responseHeaderNotContains()

Checks that current response header does not contain value.

Parameters

string $name:

string $value:

Throws

ExpectationException

File

vendor/behat/mink/src/WebAssert.php, line 204

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function responseHeaderNotContains($name, $value) {
  $actual = $this->session
    ->getResponseHeader($name);
  $message = sprintf('The text "%s" was found in the "%s" response header, but it should not.', $value, $name);
  $this
    ->assert(false === stripos($actual, $value), $message);
}