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 . '>' . $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 . '>' . $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.' );
}
/**