src/Constraints/HasText.php
protected function matches($crawler): bool
    {
        $pattern = $this->getEscapedPattern($this->text);

        return preg_match("/{$pattern}/i", $this->text($crawler));
    }
protected function matches($crawler): bool
    {
        $pattern = $this->getEscapedPattern($this->text);

        return preg_match("/{$pattern}/i", $this->text($crawler));
    }
protected function matches ( $ crawler ) : bool { $ pattern = $ this -> getEscapedPattern ( $ this -> text ) ; return preg_match ( "/{$pattern}/i" , $ this -> text ( $ crawler ) ) ; }
Check if the plain text is found in the given crawler.

@param  \Symfony\Component\DomCrawler\Crawler|string  $crawler
@return bool
Check if the plain text is found in the given crawler .