public function pageTextContains($text)
    {
        $actual = $this->session->getPage()->getText();
        $actual = preg_replace('/\s+/u', ' ', $actual);
        $regex = '/'.preg_quote($text, '/').'/ui';
        $message = sprintf('The text "%s" was not found anywhere in the text of the current page.', $text);

        $this->assertResponseText((bool) preg_match($regex, $actual), $message);
    }
public function pageTextContains($text)
    {
        $actual = $this->session->getPage()->getText();
        $actual = preg_replace('/\s+/u', ' ', $actual);
        $regex = '/'.preg_quote($text, '/').'/ui';
        $message = sprintf('The text "%s" was not found anywhere in the text of the current page.', $text);

        $this->assertResponseText((bool) preg_match($regex, $actual), $message);
    }
public function pageTextContains ( $ text ) { $ actual = $ this -> session -> getPage ( ) -> getText ( ) ; $ actual = preg_replace ( '/\s+/u' , ' ' , $ actual ) ; $ regex = '/' . preg_quote ( $ text , '/' ) . '/ui' ; $ message = sprintf ( 'The text "%s" was not found anywhere in the text of the current page.' , $ text ) ; $ this -> assertResponseText ( ( bool ) preg_match ( $ regex , $ actual ) , $ message ) ; }
Checks that current page contains text.

@param string $text

@throws ResponseTextException
Checks that current page contains text .