Skip to content

Commit

Permalink
Revert "Use $p variable for processor like other tests"
Browse files Browse the repository at this point in the history
This reverts commit 0deab0a.
  • Loading branch information
sirreal committed Jan 31, 2024
1 parent 31d71de commit 19bea7f
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 @@ -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.' );
}

/**
Expand Down

0 comments on commit 19bea7f

Please sign in to comment.