You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #39856 [DomCrawler] improve failure messages of the CrawlerSelectorTextContains constraint (xabbuh)
This PR was merged into the 4.4 branch.
Discussion
----------
[DomCrawler] improve failure messages of the CrawlerSelectorTextContains constraint
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #33551, #37757
| License | MIT
| Doc PR |
Commits
-------
ba451ab7b2 improve failure messages of the CrawlerSelectorTextContains constraint
$this->assertEquals("Failed asserting that the Crawler has a node matching selector \"title\" with content containing \"Foo\".\n", TestFailure::exceptionToString($e));
32
31
33
-
return;
32
+
$this->fail();
33
+
} catch (ExpectationFailedException$e) {
34
+
$this->assertEquals("Failed asserting that the text \"Bar\" of the node matching selector \"title\" contains \"Foo\".\n", TestFailure::exceptionToString($e));
0 commit comments