- Timestamp:
- 03/05/2024 05:32:19 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
r57508 r57768 546 546 $this->assertTrue( $processor->get_attribute( 'two' ) ); 547 547 } 548 549 /** 550 * Ensures that breadcrumbs are properly reported after seeking backward to a location 551 * inside an element which has been fully closed before the seek. 552 * 553 * @ticket 60687 554 */ 555 public function test_retains_proper_bookmarks_after_seeking_back_to_closed_element() { 556 $processor = WP_HTML_Processor::create_fragment( '<div><img></div><div><hr></div>' ); 557 558 $processor->next_tag( 'IMG' ); 559 $processor->set_bookmark( 'first' ); 560 561 $processor->next_tag( 'HR' ); 562 563 $processor->seek( 'first' ); 564 $this->assertSame( 565 array( 'HTML', 'BODY', 'DIV', 'IMG' ), 566 $processor->get_breadcrumbs(), 567 'Should have retained breadcrumbs from bookmarked location after seeking backwards to it.' 568 ); 569 } 548 570 }
Note: See TracChangeset
for help on using the changeset viewer.