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