- Timestamp:
- 04/19/2023 09:25:32 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php
r55619 r55659 964 964 965 965 /** 966 * Ensures that when setting an attribute multiple times that only 967 * one update flushes out into the updated HTML. 968 * 969 * @ticket 58146 970 * 971 * @covers WP_HTML_Tag_Processor::set_attribute 972 */ 973 public function test_set_attribute_with_case_variants_updates_only_the_original_first_copy() { 974 $p = new WP_HTML_Tag_Processor( '<div data-enabled="5">' ); 975 $p->next_tag(); 976 $p->set_attribute( 'DATA-ENABLED', 'canary' ); 977 $p->set_attribute( 'Data-Enabled', 'canary' ); 978 $p->set_attribute( 'dATa-EnABled', 'canary' ); 979 980 $this->assertSame( '<div data-enabled="canary">', strtolower( $p->get_updated_html() ) ); 981 } 982 983 /** 966 984 * @ticket 56299 967 985 *
Note: See TracChangeset
for help on using the changeset viewer.