this can be simplified by letting the WebAssert throw the exception (will also be easier when migrating to Mink 2.0 where the signature of the exception constructor changes to use the driver rather than the session):

```php
$tr = $this->assertSession()->elementExists('css', sprintf('table tbody tr:contains("%s")', $value)));
$this->assertSession()->elementExists('css', $element, $tr);
```