Skip to content

Commit

Permalink
Update docblock lints and re-add MathML and SVG comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Dec 23, 2023
1 parent 9f9ce0d commit 3f9670a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
6 changes: 4 additions & 2 deletions tests/phpunit/tests/html-api/wpHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ public function test_fails_to_reconstruct_formatting_elements() {
* as handling is implemented. Otherwise there's risk of leaving special
* handling (that is never reached) when tag handling is implemented.
*
* @dataProvider data_unsupported_special_in_body_tags
* @ticket 60092
*
* @param string $tag_name Name of the tag to test.
* @dataProvider data_unsupported_special_in_body_tags
*
* @covers WP_HTML_Processor::step_in_body
*
* @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 . '>' );
Expand Down
28 changes: 21 additions & 7 deletions tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ public function test_has_element_in_scope_needs_support() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );
}
Expand Down Expand Up @@ -108,12 +110,14 @@ public function test_has_element_in_list_item_scope_needs_support() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );

Expand Down Expand Up @@ -147,12 +151,14 @@ public function test_has_element_in_button_scope_needs_support() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );
}
Expand Down Expand Up @@ -180,12 +186,14 @@ public function test_after_element_pop_must_maintain_p_in_button_scope_flag() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );
}
Expand Down Expand Up @@ -213,12 +221,14 @@ public function test_after_element_push_must_maintain_p_in_button_scope_flag() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );
}
Expand All @@ -245,12 +255,14 @@ public function test_has_element_in_table_scope_needs_support() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );

Expand Down Expand Up @@ -293,12 +305,14 @@ public function test_has_element_in_select_scope_needs_support() {
$this->ensure_support_is_added_everywhere( 'OBJECT' );
$this->ensure_support_is_added_everywhere( 'TEMPLATE' );

// MathML Elements.
// MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML.
$this->ensure_support_is_added_everywhere( 'MATH' );

/*
* SVG elements: note that TITLE is both an HTML element and an SVG element
* so care must be taken when adding support for either one.
*
* FOREIGNOBJECT, DESC, TITLE.
*/
$this->ensure_support_is_added_everywhere( 'SVG' );

Expand Down

0 comments on commit 3f9670a

Please sign in to comment.