- Timestamp:
- 05/03/2023 11:55:26 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.2/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php
r55668 r55707 405 405 'Casting WP_HTML_Tag_Processor to a string without performing any updates did not return the initial HTML snippet' 406 406 ); 407 } 408 409 /** 410 * Ensures that when seeking to an earlier spot in the document that 411 * all previously-enqueued updates are applied as they ought to be. 412 * 413 * @ticket 58160 414 */ 415 public function test_get_updated_html_applies_updates_to_content_after_seeking_to_before_parsed_bytes() { 416 $p = new WP_HTML_Tag_Processor( '<div><img hidden></div>' ); 417 418 $p->next_tag(); 419 $p->set_attribute( 'wonky', true ); 420 $p->next_tag(); 421 $p->set_bookmark( 'here' ); 422 423 $p->next_tag( array( 'tag_closers' => 'visit' ) ); 424 $p->seek( 'here' ); 425 426 $this->assertSame( '<div wonky><img hidden></div>', $p->get_updated_html() ); 407 427 } 408 428
Note: See TracChangeset
for help on using the changeset viewer.