function CrawlerSelectorTextContains::matches
Parameters
Crawler $crawler:
Overrides Constraint::matches
File
-
vendor/
symfony/ dom-crawler/ Test/ Constraint/ CrawlerSelectorTextContains.php, line 40
Class
Namespace
Symfony\Component\DomCrawler\Test\ConstraintCode
protected function matches($crawler) : bool {
$crawler = $crawler->filter($this->selector);
if (!\count($crawler)) {
$this->hasNode = false;
return false;
}
$this->hasNode = true;
$this->nodeText = $crawler->text(null, true);
return str_contains($this->nodeText, $this->expectedText);
}