Mercurial > hg > isophonics-drupal-site
diff vendor/behat/mink/src/WebAssert.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
line wrap: on
line diff
--- a/vendor/behat/mink/src/WebAssert.php Fri Feb 23 15:51:18 2018 +0000 +++ b/vendor/behat/mink/src/WebAssert.php Fri Feb 23 15:52:07 2018 +0000 @@ -319,10 +319,9 @@ public function responseContains($text) { $actual = $this->session->getPage()->getContent(); - $regex = '/'.preg_quote($text, '/').'/ui'; $message = sprintf('The string "%s" was not found anywhere in the HTML response of the current page.', $text); - $this->assert((bool) preg_match($regex, $actual), $message); + $this->assert(stripos($actual, $text) !== false, $message); } /** @@ -335,10 +334,9 @@ public function responseNotContains($text) { $actual = $this->session->getPage()->getContent(); - $regex = '/'.preg_quote($text, '/').'/ui'; $message = sprintf('The string "%s" appears in the HTML response of this page, but it should not.', $text); - $this->assert(!preg_match($regex, $actual), $message); + $this->assert(stripos($actual, $text) === false, $message); } /**