Skip to content

Commit 860ab54

Browse files
committed
Add skipping of certain tests
1 parent 04d94ab commit 860ab54

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66
* @package WordPress
77
* @subpackage HTML-API
88
*
9-
* @since TODO
9+
* @since {WP_VERSION}
1010
*
1111
* @group html-api
1212
*
1313
* @coversDefaultClass WP_HTML_Processor
1414
*/
1515
class Tests_HtmlApi_WpHtmlProcessorHtml5lib extends WP_UnitTestCase {
16+
17+
const SKIP_TESTS = array(
18+
'adoption01/case10 - line 159' => 'Unimplemented: Reconstruction of active formatting elements.',
19+
'adoption01/case17 - line 318' => 'Unimplemented: Reconstruction of active formatting elements.',
20+
'adoption01/case4 - line 46' => 'Unimplemented: Reconstruction of active formatting elements.',
21+
'tests15/case1 - line 1' => 'Unimplemented: Reconstruction of active formatting elements.',
22+
'tests15/case2 - line 22' => 'Unimplemented: Reconstruction of active formatting elements.',
23+
);
24+
1625
/**
1726
* Verify the parsing results of the HTML Processor against the
1827
* test cases in the Html5lib tests project.
@@ -27,6 +36,11 @@ class Tests_HtmlApi_WpHtmlProcessorHtml5lib extends WP_UnitTestCase {
2736
*/
2837
public function test_external_html5lib( $fragment_context, $html, $result ) {
2938
$processed_tree = self::build_html5_treelike_string( $fragment_context, $html );
39+
40+
if ( array_key_exists( $this->dataName(), self::SKIP_TESTS ) ) {
41+
$this->markTestSkipped( self::SKIP_TESTS[$this->dataName()] );
42+
}
43+
3044
if ( null === $processed_tree ) {
3145
$this->markTestSkipped( 'Skipped test because it contains unsupported markup.' );
3246
} else {

0 commit comments

Comments
 (0)