Skip to content

Commit

Permalink
Reduce the scope of the merge PHP unit test - let's just test backgro…
Browse files Browse the repository at this point in the history
…und styles as general styles are tested above in test_merge_incoming_data
  • Loading branch information
ramonjd committed Aug 14, 2024
1 parent b0373bf commit f6f7f7a
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions phpunit/class-wp-theme-json-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -2305,9 +2305,6 @@ public function test_merge_incoming_styles() {
),
'backgroundSize' => 'cover',
),
'typography' => array(
'fontSize' => '10px',
),
'blocks' => array(
'core/group' => array(
'background' => array(
Expand All @@ -2327,11 +2324,6 @@ public function test_merge_incoming_styles() {
),
),
),
'core/verse' => array(
'background' => array(
'backgroundImage' => "url('http://example.org/verse.png')",
),
),
),
),
)
Expand All @@ -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(
Expand All @@ -2354,6 +2343,11 @@ public function test_merge_incoming_styles() {
),
),
),
'core/quote' => array(
'background' => array(
'backgroundAttachment' => 'fixed',
),
),
'core/verse' => array(
'background' => array(
'backgroundImage' => array(
Expand All @@ -2373,9 +2367,6 @@ public function test_merge_incoming_styles() {
),
'backgroundSize' => 'contain',
),
'typography' => array(
'fontSize' => '12px',
),
'blocks' => array(
'core/group' => array(
'background' => array(
Expand All @@ -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(
Expand Down

0 comments on commit f6f7f7a

Please sign in to comment.