Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip unhandled tests
  • Loading branch information
sirreal committed Dec 19, 2023
commit 9d6f90ff524501ec8fe7db76cd021dea6a3e2123
11 changes: 8 additions & 3 deletions tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ class Tests_HtmlApi_WpHtmlProcessorHtml5lib extends WP_UnitTestCase {
* @dataProvider data_external_html5lib_tests
*/
public function test_external_html5lib( $html, $result ) {
$processed = self::build_html5_treelike_string( $html );

$processed_tree = self::build_html5_treelike_string( $html );
$this->assertEquals( $processed_tree, $result );
if ( $processed["error"] === "unsupported" ) {
$this->markTestSkipped();
return;
}

$this->assertEquals( $processed["output"], $result );
}


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

return $output;
return [ "output" => $output, "error" => $p->get_last_error() ];
}

static function parse_html5_dat_testfile( $filename ) {
Expand Down