- 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-style.php
r60729 r61020 191 191 >Text</div>'; 192 192 list($p) = $this->process_directives( $html ); 193 $this->assertSame( ' color:green;background:green;', $p->get_attribute( 'style' ) );193 $this->assertSame( 'background:green;color:green;', $p->get_attribute( 'style' ) ); 194 194 } 195 195 … … 449 449 $this->assertNull( $p->get_attribute( 'style' ) ); 450 450 } 451 452 /** 453 * Tests it can use CSS variables. 454 * 455 * @ticket 64106 456 * 457 * @covers ::process_directives 458 */ 459 public function test_wp_style_can_use_CSS_variables() { 460 $html = '<div data-wp-style----text-color="myPlugin::state.green">Text</div>'; 461 list($p) = $this->process_directives( $html ); 462 $this->assertSame( '--text-color:green;', $p->get_attribute( 'style' ) ); 463 } 464 465 /** 466 * Tests it ignores unique IDs. 467 * 468 * @ticket 64106 469 * 470 * @covers ::process_directives 471 */ 472 public function test_wp_style_ignores_unique_ids() { 473 $html = '<div data-wp-style--color---unique-id="myPlugin::state.green">Text</div>'; 474 list($p) = $this->process_directives( $html ); 475 $this->assertNull( $p->get_attribute( 'style' ) ); 476 } 451 477 }
Note: See TracChangeset
for help on using the changeset viewer.