function WebAssert::responseHeaderNotMatches
Checks that current response header does not match regex.
Parameters
string $name:
string $regex:
Return value
void
Throws
File
-
vendor/
behat/ mink/ src/ WebAssert.php, line 265
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function responseHeaderNotMatches(string $name, string $regex) {
$actual = (string) $this->session
->getResponseHeader($name);
$message = sprintf('The pattern "%s" was found in the text of the "%s" response header, but it should not.', $regex, $name);
$this->assert(!preg_match($regex, $actual), $message);
}