@@ -80,16 +80,14 @@ public static function data_modifiable_text_special_textarea(): array {
8080 */
8181 public function test_set_modifiable_fails_non_atomic_tags (
8282 string $ html ,
83- string $ expected_namespace ,
8483 string $ target_tag
8584 ): void {
8685 $ processor = WP_HTML_Processor::create_fragment ( $ html );
8786 $ this ->assertInstanceOf ( WP_HTML_Tag_Processor::class, $ processor );
8887 $ this ->assertTrue ( $ processor ->next_tag ( $ target_tag ), 'Failed to find target tag. ' );
89- $ this ->assertSame ( $ expected_namespace , $ processor ->get_namespace (), 'Unexpected namespace. ' );
9088 $ this ->assertFalse (
9189 $ processor ->set_modifiable_text ( 'test ' ),
92- "set_modifiable_text() should return false for {$ expected_namespace }: {$ target_tag }. "
90+ "set_modifiable_text() should return false on {$ processor -> get_namespace () }: {$ processor -> get_qualified_tag_name () }. "
9391 );
9492 $ this ->assertSame (
9593 $ html ,
@@ -106,23 +104,23 @@ public function test_set_modifiable_fails_non_atomic_tags(
106104 public static function data_set_modifiable_fails_non_atomic_tags (): array {
107105 return array (
108106 // Plain HTML tags.
109- 'html DIV ' => array ( '<div> ' , 'html ' , ' DIV ' ),
107+ 'html DIV ' => array ( '<div> ' , 'DIV ' ),
110108
111109 // Foreign elements with non-atomic tags.
112- 'svg PATH ' => array ( '<svg><path></path></svg> ' , 'svg ' , ' PATH ' ),
113- 'svg PATH (self-closing) ' => array ( '<svg><path /></svg> ' , 'svg ' , ' PATH ' ),
114- 'math MTEXT ' => array ( '<math><mtext></mtext></math> ' , 'math ' , ' MTEXT ' ),
115- 'math MSPACE (self-closing) ' => array ( '<math><mspace /></math> ' , 'math ' , ' MSPACE ' ),
110+ 'svg PATH ' => array ( '<svg><path></path></svg> ' , 'PATH ' ),
111+ 'svg PATH (self-closing) ' => array ( '<svg><path /></svg> ' , 'PATH ' ),
112+ 'math MTEXT ' => array ( '<math><mtext></mtext></math> ' , 'MTEXT ' ),
113+ 'math MSPACE (self-closing) ' => array ( '<math><mspace /></math> ' , 'MSPACE ' ),
116114
117115 // Foreign elements with atomic-like tags.
118- 'svg TEXTAREA ' => array ( '<svg><textarea></textarea></svg> ' , 'svg ' , ' TEXTAREA ' ),
119- 'svg TITLE ' => array ( '<svg><title></title></svg> ' , 'svg ' , ' TITLE ' ),
120- 'svg STYLE ' => array ( '<svg><style></style></svg> ' , 'svg ' , ' STYLE ' ),
121- 'svg SCRIPT ' => array ( '<svg><script></script></svg> ' , 'svg ' , ' SCRIPT ' ),
122- 'math TEXTAREA ' => array ( '<math><textarea></textarea></math> ' , 'math ' , ' TEXTAREA ' ),
123- 'math TITLE ' => array ( '<math><title></title></math> ' , 'math ' , ' TITLE ' ),
124- 'math STYLE ' => array ( '<math><style></style></math> ' , 'math ' , ' STYLE ' ),
125- 'math SCRIPT ' => array ( '<math><script></script></math> ' , 'math ' , ' SCRIPT ' ),
116+ 'svg TEXTAREA ' => array ( '<svg><textarea></textarea></svg> ' , 'TEXTAREA ' ),
117+ 'svg TITLE ' => array ( '<svg><title></title></svg> ' , 'TITLE ' ),
118+ 'svg STYLE ' => array ( '<svg><style></style></svg> ' , 'STYLE ' ),
119+ 'svg SCRIPT ' => array ( '<svg><script></script></svg> ' , 'SCRIPT ' ),
120+ 'math TEXTAREA ' => array ( '<math><textarea></textarea></math> ' , 'TEXTAREA ' ),
121+ 'math TITLE ' => array ( '<math><title></title></math> ' , 'TITLE ' ),
122+ 'math STYLE ' => array ( '<math><style></style></math> ' , 'STYLE ' ),
123+ 'math SCRIPT ' => array ( '<math><script></script></math> ' , 'SCRIPT ' ),
126124 );
127125 }
128126}
0 commit comments