zenstruck / browser

A fluent interface for your Symfony functional tests.
MIT License
185 stars 17 forks source link

[2.x] feat!: have `assert(Not)SeeIn()` look in all matching node's text #141

Closed kbond closed 6 months ago

kbond commented 7 months ago

Given the following html:

<ul>
    <li>item 1</li>
    <li>item 2</li>
</ul>

Currently, this is the behaviour:

$browser->assertSeeIn('li', 'item1'); // pass as this is the first li in the dom
$browser->assertSeeIn('li', 'item2'); // fail

I think, in 2.x, the second should also pass.