Skip to content

Commit

Permalink
Update test_add_registered_block_styles_to_theme_data to register var…
Browse files Browse the repository at this point in the history
…iations
  • Loading branch information
oandregal committed Jun 11, 2024
1 parent 7960d62 commit 6a197d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/phpunit/tests/block-supports/block-style-variations.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public function filter_set_theme_root() {
public function test_add_registered_block_styles_to_theme_data() {
switch_theme( 'block-theme' );

// Trigger block style registration that occurs on `init` action.
// do_action( 'init' ) could be used here however this direct call
// means only the updates being tested are performed.
wp_register_block_style_variations_from_theme();

$variation_styles_data = array(
'color' => array(
'background' => 'darkslateblue',
Expand Down

0 comments on commit 6a197d3

Please sign in to comment.