- Timestamp:
- 03/11/2024 11:53:07 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php
r57527 r57805 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.