- Timestamp:
- 07/24/2024 06:39:46 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php
r58779 r58806 425 425 $this->assertNull( $processor->get_attribute_names_with_prefix( '' ), 'Should have ignored any attributes on the tag.' ); 426 426 } 427 428 /******************************************************************* 429 * RULES FOR "IN TABLE" MODE 430 *******************************************************************/ 431 432 /** 433 * Ensure that form elements in tables (but not cells) are immediately popped off the stack. 434 * 435 * @ticket 61576 436 */ 437 public function test_table_form_element_immediately_popped() { 438 $processor = WP_HTML_Processor::create_fragment( '<table><form><!--comment-->' ); 439 440 // There should be a FORM opener and a (virtual) FORM closer. 441 $this->assertTrue( $processor->next_tag( 'FORM' ) ); 442 $this->assertTrue( $processor->next_token() ); 443 $this->assertSame( 'FORM', $processor->get_token_name() ); 444 $this->assertTrue( $processor->is_tag_closer() ); 445 446 // Followed by the comment token. 447 $this->assertTrue( $processor->next_token() ); 448 $this->assertSame( '#comment', $processor->get_token_name() ); 449 $this->assertsame( array( 'HTML', 'BODY', 'TABLE', '#comment' ), $processor->get_breadcrumbs() ); 450 } 427 451 }
Note: See TracChangeset
for help on using the changeset viewer.