Skip to content

Commit

Permalink
Use $p variable for processor like other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 30, 2024
1 parent a172e31 commit 0deab0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/tests/html-api/wpHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,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 ) {
$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.' );
$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.' );
}

/**
Expand Down

0 comments on commit 0deab0a

Please sign in to comment.