From f6f7f7a0fbdd94b3a2b0b1358569310b62f0129f Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 14 Aug 2024 14:18:12 +1000 Subject: [PATCH] Reduce the scope of the merge PHP unit test - let's just test background styles as general styles are tested above in test_merge_incoming_data --- phpunit/class-wp-theme-json-test.php | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/phpunit/class-wp-theme-json-test.php b/phpunit/class-wp-theme-json-test.php index f8fa9511b1b82b..10bb47b87fba89 100644 --- a/phpunit/class-wp-theme-json-test.php +++ b/phpunit/class-wp-theme-json-test.php @@ -2294,7 +2294,7 @@ public function test_merge_incoming_data_presets_use_default_names() { $this->assertSameSetsWithIndex( $expected, $actual ); } - public function test_merge_incoming_styles() { + public function test_merge_incoming_background_styles() { $theme_json = new WP_Theme_JSON_Gutenberg( array( 'version' => WP_Theme_JSON_Gutenberg::LATEST_SCHEMA, @@ -2305,9 +2305,6 @@ public function test_merge_incoming_styles() { ), 'backgroundSize' => 'cover', ), - 'typography' => array( - 'fontSize' => '10px', - ), 'blocks' => array( 'core/group' => array( 'background' => array( @@ -2327,11 +2324,6 @@ public function test_merge_incoming_styles() { ), ), ), - 'core/verse' => array( - 'background' => array( - 'backgroundImage' => "url('http://example.org/verse.png')", - ), - ), ), ), ) @@ -2343,9 +2335,6 @@ public function test_merge_incoming_styles() { 'background' => array( 'backgroundSize' => 'contain', ), - 'typography' => array( - 'fontSize' => '12px', - ), 'blocks' => array( 'core/group' => array( 'background' => array( @@ -2354,6 +2343,11 @@ public function test_merge_incoming_styles() { ), ), ), + 'core/quote' => array( + 'background' => array( + 'backgroundAttachment' => 'fixed', + ), + ), 'core/verse' => array( 'background' => array( 'backgroundImage' => array( @@ -2373,9 +2367,6 @@ public function test_merge_incoming_styles() { ), 'backgroundSize' => 'contain', ), - 'typography' => array( - 'fontSize' => '12px', - ), 'blocks' => array( 'core/group' => array( 'background' => array( @@ -2390,9 +2381,7 @@ public function test_merge_incoming_styles() { 'backgroundImage' => array( 'url' => 'http://example.org/quote.png', ), - 'backgroundAttachment' => array( - 'ref' => 'styles.blocks.core/group.background.backgroundAttachment', - ), + 'backgroundAttachment' => 'fixed', ), ), 'core/verse' => array(