function WebAssert::responseNotContains
Checks that page HTML (response content) does not contains text.
Parameters
string $text:
Return value
void
Throws
File
-
vendor/
behat/ mink/ src/ WebAssert.php, line 375
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function responseNotContains(string $text) {
$actual = $this->session
->getPage()
->getContent();
$message = sprintf('The string "%s" appears in the HTML response of this page, but it should not.', $text);
$this->assert(stripos($actual, (string) $text) === false, $message);
}