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

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

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

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