Skip to content

Commit 7bf4947

Browse files
committed
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 #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
1 parent fa417fc commit 7bf4947

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ public function test_cannot_nest_void_tags( $tag_name ) {
155155

156156
$found_tag = $processor->next_tag();
157157

158-
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
159-
$this->markTestSkipped( "Tag {$tag_name} is not supported." );
160-
}
161-
162158
$this->assertTrue(
163159
$found_tag,
164160
"Could not find first {$tag_name}."
@@ -220,10 +216,6 @@ public function test_expects_closer_expects_no_closer_for_self_contained_tokens(
220216
$processor = WP_HTML_Processor::create_fragment( $self_contained_token );
221217
$found_token = $processor->next_token();
222218

223-
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
224-
$this->markTestSkipped( "HTML '{$self_contained_token}' is not supported." );
225-
}
226-
227219
$this->assertTrue(
228220
$found_token,
229221
"Failed to find any tokens in '{$self_contained_token}': check test data provider."
@@ -305,10 +297,6 @@ public function test_cannot_nest_void_tags_next_token( $tag_name ) {
305297

306298
$found_tag = $processor->next_token();
307299

308-
if ( WP_HTML_Processor::ERROR_UNSUPPORTED === $processor->get_last_error() ) {
309-
$this->markTestSkipped( "Tag {$tag_name} is not supported." );
310-
}
311-
312300
$this->assertTrue(
313301
$found_tag,
314302
"Could not find first {$tag_name}."

0 commit comments

Comments
 (0)