Skip to content

Commit

Permalink
Correct test function
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 17, 2024
1 parent e0fea7b commit bad1c1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/phpunit/tests/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -1936,11 +1936,13 @@ public function filter_wp_kses_object_added_in_html_filter( $tags, $context ) {
*
* @ticket 61009
*
* @dataProvider data_html_containing_various_kinds_of_html_comments
*
* @param string $html_comment HTML containing a comment; must not be a valid comment
* but must be syntax which a browser interprets as a comment.
* @param string $expected_output How `wp_kses()` ought to transform the comment.
*/
public function wp_kses_preserves_html_comments( $html_comment, $expected_output ) {
public function test_wp_kses_preserves_html_comments( $html_comment, $expected_output ) {
$this->assertSame(
$expected_output,
wp_kses( $html_comment, array() ),
Expand All @@ -1955,8 +1957,8 @@ public function wp_kses_preserves_html_comments( $html_comment, $expected_output
*/
public static function data_html_containing_various_kinds_of_html_comments() {
return array(
'Normative HTML comment' => array( 'before<!-- this is a comment -->after', 'before<!-- this is a comment -->after' ),
'Closing tag with invalid tag name' => array( 'before<//not a tag>after', 'before<//not a tag>after' ),
'Normative HTML comment' => array( 'before<!-- this is a comment -->after', 'before<!-- this is a comment -->after' ),
'Closing tag with invalid tag name' => array( 'before<//not a tag>after', 'before<//not a tag>after' ),
'Incorrectly opened comment (Markup declaration)' => array( 'before<!also not a tag>after', 'before<!also not a tag>after' ),
);
}
Expand Down

0 comments on commit bad1c1e

Please sign in to comment.