diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php index c9d996175eab..ffc6f5677cc5 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php @@ -45,7 +45,7 @@ protected function matches($crawler): bool return false; } - return false !== mb_strpos($crawler->text(null, false), $this->expectedText); + return false !== mb_strpos($crawler->text(null, true), $this->expectedText); } /** diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php index 66adadd9d4ba..551cdca8c3fa 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php @@ -45,7 +45,7 @@ protected function matches($crawler): bool return false; } - return $this->expectedText === trim($crawler->text(null, false)); + return $this->expectedText === trim($crawler->text(null, true)); } /**