public function WebAssert::pageTextNotMatches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::pageTextNotMatches()
Checks that current page text does not matches regex.
Parameters
string $regex:
Throws
File
- vendor/
behat/ mink/ src/ WebAssert.php, line 304
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function pageTextNotMatches($regex) {
$actual = $this->session
->getPage()
->getText();
$message = sprintf('The pattern %s was found in the text of the current page, but it should not.', $regex);
$this
->assertResponseText(!preg_match($regex, $actual), $message);
}