From 19bea7f73658b217afc04f88ba6c195cd990d8d8 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 31 Jan 2024 10:26:06 +0100 Subject: [PATCH] Revert "Use $p variable for processor like other tests" This reverts commit 0deab0a60878082c4cf87da10669bdc929e0c891. --- tests/phpunit/tests/html-api/wpHtmlProcessor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor.php b/tests/phpunit/tests/html-api/wpHtmlProcessor.php index 696fb1c26e609..60d368efae1cc 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor.php @@ -280,9 +280,9 @@ public function data_void_tags() { * @param string $tag_name Name of the tag to test. */ public function test_step_in_body_fails_on_unsupported_tags( $tag_name ) { - $p = WP_HTML_Processor::create_fragment( '<' . $tag_name . '>' ); - $this->assertFalse( $p->next_tag(), 'Should fail to find tag: ' . $tag_name . '.' ); - $this->assertEquals( $p->get_last_error(), WP_HTML_Processor::ERROR_UNSUPPORTED, 'Should have unsupported last error.' ); + $fragment = WP_HTML_Processor::create_fragment( '<' . $tag_name . '>' ); + $this->assertFalse( $fragment->next_tag(), 'Should fail to find tag: ' . $tag_name . '.' ); + $this->assertEquals( $fragment->get_last_error(), WP_HTML_Processor::ERROR_UNSUPPORTED, 'Should have unsupported last error.' ); } /**