HTML API: Remove unnecessary skips in tests for unsupported markup.

The HTML API allowed tests to be skipped for unsupported HTML, for example tags that had not yet been implemented. This provided stability to the test suite while primary support was being added.

In many places, the tags are now fully supported and the test skips can be removed.

Developed in https://github.com/wordpress/wordpress-develop/pull/7186
Discussed in https://core.trac.wordpress.org/ticket/61646

Props jonsurrell.
See #61646.


git-svn-id: https://develop.svn.wordpress.org/trunk@58892 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dennis Snell 2024-08-13 21:42:07 +00:00
parent fa417fc14a
commit 7bf4947029

View File

@ -155,10 +155,6 @@ class Tests_HtmlApi_WpHtmlProcessor extends WP_UnitTestCase {
$found_tag = $processor->next_tag(); $found_tag = $processor->next_tag();
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
$this->markTestSkipped( "Tag {$tag_name} is not supported." );
}
$this->assertTrue( $this->assertTrue(
$found_tag, $found_tag,
"Could not find first {$tag_name}." "Could not find first {$tag_name}."
@ -220,10 +216,6 @@ class Tests_HtmlApi_WpHtmlProcessor extends WP_UnitTestCase {
$processor = WP_HTML_Processor::create_fragment( $self_contained_token ); $processor = WP_HTML_Processor::create_fragment( $self_contained_token );
$found_token = $processor->next_token(); $found_token = $processor->next_token();
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
$this->markTestSkipped( "HTML '{$self_contained_token}' is not supported." );
}
$this->assertTrue( $this->assertTrue(
$found_token, $found_token,
"Failed to find any tokens in '{$self_contained_token}': check test data provider." "Failed to find any tokens in '{$self_contained_token}': check test data provider."
@ -305,10 +297,6 @@ class Tests_HtmlApi_WpHtmlProcessor extends WP_UnitTestCase {
$found_tag = $processor->next_token(); $found_tag = $processor->next_token();
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
$this->markTestSkipped( "Tag {$tag_name} is not supported." );
}
$this->assertTrue( $this->assertTrue(
$found_tag, $found_tag,
"Could not find first {$tag_name}." "Could not find first {$tag_name}."