- Timestamp:
- 06/24/2024 08:49:52 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-global-styles-controller.php
r58394 r58466 610 610 * @covers WP_REST_Global_Styles_Controller_Gutenberg::update_item 611 611 * @ticket 61312 612 * @ticket 61451 612 613 */ 613 614 public function test_update_item_with_custom_block_style_variations() { … … 616 617 grant_super_admin( self::$admin_id ); 617 618 } 619 620 /* 621 * For variations to be resolved they have to have been registered 622 * via either a theme.json partial or through the WP_Block_Styles_Registry. 623 */ 624 register_block_style( 625 'core/group', 626 array( 627 'name' => 'fromThemeStyleVariation', 628 'label' => 'From Theme Style Variation', 629 ) 630 ); 618 631 619 632 $group_variations = array( … … 630 643 array( 631 644 'styles' => array( 632 'blocks' => array( 633 'variations' => array( 634 'fromThemeStyleVariation' => array( 635 'blockTypes' => array( 'core/group', 'core/columns' ), 636 'color' => array( 637 'background' => '#000000', 638 'text' => '#ffffff', 639 ), 645 'variations' => array( 646 'fromThemeStyleVariation' => array( 647 'blockTypes' => array( 'core/group', 'core/columns' ), 648 'color' => array( 649 'background' => '#000000', 650 'text' => '#ffffff', 640 651 ), 641 652 ), 653 ), 654 'blocks' => array( 642 655 'core/group' => array( 643 656 'variations' => $group_variations,
Note: See TracChangeset
for help on using the changeset viewer.