Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use $p variable for processor like other tests
  • Loading branch information
sirreal committed Jan 30, 2024
commit 0deab0a60878082c4cf87da10669bdc929e0c891
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