Skip to content

Commit 4e3158c

Browse files
committed
Added test to cover paquettg#189
1 parent 4bb7098 commit 4e3158c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/DomTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,4 +619,23 @@ public function testUniqueIdForAllObjects()
619619

620620
$this->assertEquals('A container div<p>Our new paragraph.</p>', $div->innerhtml);
621621
}
622+
623+
public function testFindDescendantsOfMatch()
624+
{
625+
$dom = new Dom();
626+
$dom->load('<p>
627+
<b>
628+
test
629+
<b>testing</b>
630+
<b>This is a test</b>
631+
<i>italic</i>
632+
<b>password123</b>
633+
</b>
634+
<i><b>another</b></i>
635+
</p>');
636+
637+
/** @var Dom\AbstractNode $meta */
638+
$nodes = $dom->find('b');
639+
$this->assertCount(5, $nodes);
640+
}
622641
}

0 commit comments

Comments
 (0)