- Timestamp:
- 08/23/2024 02:53:59 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
r58870 r58925 28 28 'comments01/line0155' => 'Unimplemented: Need to access raw comment text on non-normative comments.', 29 29 'comments01/line0169' => 'Unimplemented: Need to access raw comment text on non-normative comments.', 30 'doctype01/line0380' => 'Bug: Mixed whitespace, non-whitespace text in head not split correctly', 30 31 'html5test-com/line0129' => 'Unimplemented: Need to access raw comment text on non-normative comments.', 31 32 'noscript01/line0014' => 'Unimplemented: This parser does not add missing attributes to existing HTML or BODY tags.', … … 116 117 $test_context_element = $test[1]; 117 118 118 if ( self::should_skip_test( $test_context_element, $test_name , $test[3]) ) {119 if ( self::should_skip_test( $test_context_element, $test_name ) ) { 119 120 continue; 120 121 } … … 134 135 * @return bool True if the test case should be skipped. False otherwise. 135 136 */ 136 private static function should_skip_test( ?string $test_context_element, string $test_name , string $expected_tree): bool {137 private static function should_skip_test( ?string $test_context_element, string $test_name ): bool { 137 138 if ( null !== $test_context_element && 'body' !== $test_context_element ) { 138 139 return true; … … 190 191 191 192 switch ( $token_type ) { 193 case '#doctype': 194 $doctype = $processor->get_doctype_info(); 195 $output .= "<!DOCTYPE {$doctype->name}"; 196 if ( null !== $doctype->public_identifier || null !== $doctype->system_identifier ) { 197 $output .= " \"{$doctype->public_identifier}\" \"{$doctype->system_identifier}\""; 198 } 199 $output .= ">\n"; 200 break; 201 192 202 case '#tag': 193 203 $namespace = $processor->get_namespace(); … … 451 461 case 'document': 452 462 if ( '|' === $line[0] ) { 453 /* 454 * The next_token() method these tests rely on do not stop 455 * at doctype nodes. Strip doctypes from output. 456 * @todo Restore this line if and when the processor 457 * exposes doctypes. 458 */ 459 if ( '| <!DOCTYPE ' !== substr( $line, 0, 12 ) ) { 460 $test_dom .= substr( $line, 2 ); 461 } 463 $test_dom .= substr( $line, 2 ); 462 464 } else { 463 465 // This is a text node that includes unescaped newlines.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)