- Timestamp:
- 10/21/2025 12:07:16 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-class.php
r58594 r61020 77 77 >Text</div>'; 78 78 list($p) = $this->process_directives( $html ); 79 $this->assertSame( ' some-class other-class', $p->get_attribute( 'class' ) );79 $this->assertSame( 'other-class some-class', $p->get_attribute( 'class' ) ); 80 80 } 81 81 … … 329 329 $this->assertNull( $p->get_attribute( 'class' ) ); 330 330 } 331 332 /** 333 * Tests that classes with several dashes can be used. 334 * 335 * @ticket 64106 336 * 337 * @covers ::process_directives 338 */ 339 public function test_wp_class_can_use_several_dashes() { 340 $html = '<div data-wp-class--main-bg--color="myPlugin::state.true">Text</div>'; 341 list($p) = $this->process_directives( $html ); 342 $this->assertSame( 'main-bg--color', $p->get_attribute( 'class' ) ); 343 344 $html = '<div data-wp-class--main-bg---color="myPlugin::state.true">Text</div>'; 345 list($p) = $this->process_directives( $html ); 346 $this->assertSame( 'main-bg---color', $p->get_attribute( 'class' ) ); 347 348 $html = '<div data-wp-class--main-bg----color="myPlugin::state.true">Text</div>'; 349 list($p) = $this->process_directives( $html ); 350 $this->assertSame( 'main-bg----color', $p->get_attribute( 'class' ) ); 351 } 331 352 }
Note: See TracChangeset
for help on using the changeset viewer.