Skip to content

Commit 5b94370

Browse files
committed
Update test_add_registered_block_styles_to_theme_data to register variations
1 parent 73ea7da commit 5b94370

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/phpunit/tests/block-supports/block-style-variations.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ public function filter_set_theme_root() {
6565
public function test_add_registered_block_styles_to_theme_data() {
6666
switch_theme( 'block-theme' );
6767

68+
// Trigger block style registration that occurs on `init` action.
69+
// do_action( 'init' ) could be used here however this direct call
70+
// means only the updates being tested are performed.
71+
wp_register_block_style_variations_from_theme();
72+
6873
$variation_styles_data = array(
6974
'color' => array(
7075
'background' => 'darkslateblue',

0 commit comments

Comments
 (0)