Closed
Description
As discussed in symfony/symfony#35191 (comment),
@xabbuh recommended the docs could be improved by pointing out that the example does work because the html tag is unique.
I oversaw that and tried to assert that at least one th
does contain a certain text. However the functions assertSelectorTextContains
, assertSelectorTextSame
, and assertSelectorTextNotContains
will only check the first occurence of the selector, not all occurences. The current example is misleading here. My proposal:
Note: the functions `assertSelectorTextContains`, `assertSelectorTextSame`, and `assertSelectorTextNotContains` will only check the first occurence of the selector, not all occurences. If you want to assert that any match of a selector contains some text, use `$this->assertGreaterThan( 0, $crawler->filter('td.specific:contains("some text")')->count());`