Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix multibite string preg_replace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
livsi committed Mar 26, 2013
1 parent 811418e commit 6e1c4ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Behat/Mink/WebAssert.php
Expand Up @@ -168,7 +168,7 @@ public function statusCodeNotEquals($code)
public function pageTextContains($text)
{
$actual = $this->session->getPage()->getText();
$actual = preg_replace('/\s+/', ' ', $actual);
$actual = preg_replace('/\s+/u', ' ', $actual);
$regex = '/'.preg_quote($text, '/').'/ui';

if (!preg_match($regex, $actual)) {
Expand All @@ -187,7 +187,7 @@ public function pageTextContains($text)
public function pageTextNotContains($text)
{
$actual = $this->session->getPage()->getText();
$actual = preg_replace('/\s+/', ' ', $actual);
$actual = preg_replace('/\s+/u', ' ', $actual);
$regex = '/'.preg_quote($text, '/').'/ui';

if (preg_match($regex, $actual)) {
Expand Down

0 comments on commit 6e1c4ca

Please sign in to comment.