- Timestamp:
- 03/12/2024 02:25:30 PM (20 months ago)
- Location:
- branches/6.5
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.5
-
branches/6.5/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php
r57527 r57815 294 294 /** 295 295 * @ticket 56299 296 * @ticket 60697 296 297 * 297 298 * @covers WP_HTML_Tag_Processor::seek … … 300 301 $processor = new WP_HTML_Tag_Processor( '<div>First</div><div>Second</div>' ); 301 302 $processor->next_tag(); 302 $processor->set_bookmark( 'first' ); 303 $processor->next_tag(); 303 $processor->set_attribute( 'id', 'one' ); 304 $processor->set_bookmark( 'first' ); 305 $processor->next_tag(); 306 $processor->set_attribute( 'id', 'two' ); 304 307 $processor->add_class( 'second' ); 305 308 … … 308 311 309 312 $this->assertSame( 310 '<div class="first">First</div><div class="second">Second</div>', 313 'one', 314 $processor->get_attribute( 'id' ), 315 'Should have remembered attribute change from before the seek.' 316 ); 317 318 $this->assertSame( 319 '<div class="first" id="one">First</div><div class="second" id="two">Second</div>', 311 320 $processor->get_updated_html(), 312 321 'The bookmark was updated incorrectly in response to HTML markup updates'
Note: See TracChangeset
for help on using the changeset viewer.