Skip to content

Commit bcc02ae

Browse files
committed
Fix svg SCRIPT tag tests
1 parent 501d201 commit bcc02ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/phpunit/tests/html-api/wpHtmlTagProcessorScriptTag.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ public function test_is_javascript_script_tag_returns_false_before_finding_tags(
137137
public function test_is_javascript_script_tag_returns_false_for_non_html_namespace() {
138138
$processor = new WP_HTML_Tag_Processor( '<script></script>' );
139139
$processor->change_parsing_namespace( 'svg' );
140+
$processor->next_tag();
141+
$this->assertSame( 'SCRIPT', $processor->get_tag() );
140142
$this->assertFalse(
141143
$processor->is_javascript_script_tag(),
142144
'Should return false for script tags in non-HTML namespace'
@@ -237,6 +239,7 @@ public function test_is_json_script_tag_returns_false_for_non_html_namespace() {
237239
$processor = new WP_HTML_Tag_Processor( '<script></script>' );
238240
$processor->change_parsing_namespace( 'svg' );
239241
$processor->next_tag();
242+
$this->assertSame( 'SCRIPT', $processor->get_tag() );
240243
$this->assertFalse(
241244
$processor->is_json_script_tag(),
242245
'Should return false for script tags in non-HTML namespace'

0 commit comments

Comments
 (0)