Skip to content

Commit

Permalink
Update method name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Nov 8, 2024
1 parent 27a9781 commit 0789538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/phpunit/tests/html-api/wpHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1021,11 +1021,11 @@ public function test_ensure_next_token_method_extensibility( $html, $expected_to
/**
* @ticket TBD
*/
public function test_spawn_fragment_parser_in_foreign_content() {
public function test_create_fragment_at_current_node_in_foreign_content() {
$processor = WP_HTML_Processor::create_full_parser( '<svg>' );
$this->assertTrue( $processor->next_tag( 'SVG' ) );

$fragment = $processor->spawn_fragment_parser( "\0preceded-by-nul-byte<rect /><circle></circle><foreignobject><div></div></foreignobject><g>" );
$fragment = $processor->create_fragment_at_current_node( "\0preceded-by-nul-byte<rect /><circle></circle><foreignobject><div></div></foreignobject><g>" );

$this->assertSame( 'svg', $fragment->get_namespace() );
$this->assertTrue( $fragment->next_token() );
Expand All @@ -1049,11 +1049,11 @@ public function test_spawn_fragment_parser_in_foreign_content() {
/**
* @ticket TBD
*/
public function test_spawn_fragment_parser_in_foreign_content_integration_point() {
public function test_create_fragment_at_current_node_in_foreign_content_integration_point() {
$processor = WP_HTML_Processor::create_full_parser( '<svg><foreignObject>' );
$this->assertTrue( $processor->next_tag( 'foreignObject' ) );

$fragment = $processor->spawn_fragment_parser( "<image>\0not-preceded-by-nul-byte<rect />" );
$fragment = $processor->create_fragment_at_current_node( "<image>\0not-preceded-by-nul-byte<rect />" );

// Nothing has been processed, the html namespace should be used for parsing as an integration point.
$this->assertSame( 'html', $fragment->get_namespace() );
Expand Down

0 comments on commit 0789538

Please sign in to comment.