Changeset 58867 for trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php
- Timestamp:
- 08/08/2024 07:23:53 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php
r58828 r58867 360 360 361 361 /** 362 * Ensures that special handling of unsupported tags is cleaned up363 * as handling is implemented. Otherwise there's risk of leaving special364 * handling (that is never reached) when tag handling is implemented.365 *366 * @ticket 60092367 *368 * @dataProvider data_unsupported_special_in_body_tags369 *370 * @covers WP_HTML_Processor::step_in_body371 *372 * @param string $tag_name Name of the tag to test.373 */374 public function test_step_in_body_fails_on_unsupported_tags( $tag_name ) {375 $fragment = WP_HTML_Processor::create_fragment( '<' . $tag_name . '></' . $tag_name . '>' );376 $this->assertFalse( $fragment->next_tag(), 'Should fail to find tag: ' . $tag_name . '.' );377 $this->assertEquals( $fragment->get_last_error(), WP_HTML_Processor::ERROR_UNSUPPORTED, 'Should have unsupported last error.' );378 }379 380 /**381 * Data provider.382 *383 * @return array[]384 */385 public static function data_unsupported_special_in_body_tags() {386 return array(387 'MATH' => array( 'MATH' ),388 'SVG' => array( 'SVG' ),389 );390 }391 392 /**393 362 * Ensures that the HTML Processor properly reports the depth of a given element. 394 363 *
Note: See TracChangeset
for help on using the changeset viewer.