Skip to content

Commit

Permalink
fix readme section that was using contains() with a callback argument
Browse files Browse the repository at this point in the history
  • Loading branch information
FRFlor committed Jun 17, 2024
1 parent 4d8b13e commit 09b8809
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,21 @@ $this->get('/some-route')
});
```

This means that you can infinitely assert down the dom structure.
You can also infinitely assert down the dom structure.
```php
$this->get('/some-route')
->assertElementExists(function (AssertElement $element) {
$element->find('div', function (AssertElement $element) {
$element->is('div');
$element->contains('p', function (AssertElement $element) {
$element->find('p', function (AssertElement $element) {
$element->is('p');
$element->contains('#label', function (AssertElement $element) {
$element->find('#label', function (AssertElement $element) {
$element->is('span');
});
});
$element->contains('p:nth-of-type(2)', function (AssertElement $element) {
$element->find('p:nth-of-type(2)', function (AssertElement $element) {
$element->is('p');
$element->contains('.sub-header', function (AssertElement $element) {
$element->find('.sub-header', function (AssertElement $element) {
$element->is('h4');
});
});
Expand Down

0 comments on commit 09b8809

Please sign in to comment.