- Timestamp:
- 01/19/2024 09:40:01 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php
r57314 r57316 393 393 $this->assertSame( array( 'HTML', 'BODY', 'DIV', 'DIV' ), $p->get_breadcrumbs(), 'Failed to produce expected DOM nesting: SPAN should be closed and DIV should be its sibling.' ); 394 394 } 395 396 /** 397 * Ensures that support isn't accidentally partially added for the closing BR tag `</br>`. 398 * 399 * This tag closer has special rules and support shouldn't be added without implementing full support. 400 * 401 * > An end tag whose tag name is "br" 402 * > Parse error. Drop the attributes from the token, and act as described in the next entry; 403 * > i.e. act as if this was a "br" start tag token with no attributes, rather than the end 404 * > tag token that it actually is. 405 * 406 * When this handling is implemented, this test should be removed. It's not incorporated 407 * into the existing unsupported tag behavior test because the opening tag is supported; 408 * only the closing tag isn't. 409 * 410 * @covers WP_HTML_Processor::step_in_body 411 * 412 * @ticket 60283 413 */ 414 public function test_br_end_tag_unsupported() { 415 $p = WP_HTML_Processor::create_fragment( '</br>' ); 416 417 $this->assertFalse( $p->next_tag(), 'Found a BR tag that should not be handled.' ); 418 $this->assertSame( WP_HTML_Processor::ERROR_UNSUPPORTED, $p->get_last_error() ); 419 } 395 420 }
Note: See TracChangeset
for help on using the changeset viewer.