Skip to content

Commit e81776d

Browse files
committed
Skip unhandled tests
1 parent 0c69dd8 commit e81776d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ class Tests_HtmlApi_WpHtmlProcessorHtml5lib extends WP_UnitTestCase {
1717
* @dataProvider data_external_html5lib_tests
1818
*/
1919
public function test_external_html5lib( $html, $result ) {
20+
$processed = self::build_html5_treelike_string( $html );
2021

21-
$processed_tree = self::build_html5_treelike_string( $html );
22-
$this->assertEquals( $processed_tree, $result );
22+
if ( $processed["error"] === "unsupported" ) {
23+
$this->markTestSkipped();
24+
return;
25+
}
26+
27+
$this->assertEquals( $processed["output"], $result );
2328
}
2429

2530

@@ -60,7 +65,7 @@ static function build_html5_treelike_string( $html ) {
6065
$output .= "<{$t}>\n";
6166
}
6267

63-
return $output;
68+
return [ "output" => $output, "error" => $p->get_last_error() ];
6469
}
6570

6671
static function parse_html5_dat_testfile( $filename ) {

0 commit comments

Comments
 (0)