Skip to content

Commit 287e271

Browse files
committed
bug #35899 [DomCrawler] prevent deprecation being triggered from assertion (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [DomCrawler] prevent deprecation being triggered from assertion | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35889 | License | MIT | Doc PR | Commits ------- b01a10c760 prevent deprecation being triggered from assertion
2 parents 11dcf08 + 5543c46 commit 287e271

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Test/Constraint/CrawlerSelectorTextContains.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function matches($crawler): bool
4545
return false;
4646
}
4747

48-
return false !== mb_strpos($crawler->text(), $this->expectedText);
48+
return false !== mb_strpos($crawler->text(null, false), $this->expectedText);
4949
}
5050

5151
/**

Test/Constraint/CrawlerSelectorTextSame.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function matches($crawler): bool
4545
return false;
4646
}
4747

48-
return $this->expectedText === trim($crawler->text());
48+
return $this->expectedText === trim($crawler->text(null, false));
4949
}
5050

5151
/**

0 commit comments

Comments
 (0)