From 3bc443e38821dc19fa4fc6109a943d52003d5e21 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Fri, 9 Dec 2022 17:41:40 -0700 Subject: [PATCH] Add additional test for child selection --- phpunit/html/wp-html-processor-test.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpunit/html/wp-html-processor-test.php b/phpunit/html/wp-html-processor-test.php index 00e8b812f62d17..3a0e1521937f9b 100644 --- a/phpunit/html/wp-html-processor-test.php +++ b/phpunit/html/wp-html-processor-test.php @@ -32,6 +32,13 @@ public function test_find_immediate_child_tag() { $this->assertFalse( $tags->next_within_balanced_tags( 'img', 1 ) ); } + public function test_find_immediate_child_tag2() { + $tags = new WP_HTML_Processor( '
' ); + + $tags->next_tag( 'div' ); + $this->assertTrue( $tags->next_within_balanced_tags( 'img', 1 ) ); + } + public function test_find_child_tag() { $tags = new WP_HTML_Processor( '
' );