Mercurial > hg > cmmr2012-drupal-site
diff vendor/behat/mink/src/WebAssert.php @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/vendor/behat/mink/src/WebAssert.php Thu Jul 05 15:32:06 2018 +0100 +++ b/vendor/behat/mink/src/WebAssert.php Tue Jul 10 13:19:18 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); } /**