Skip to content

Commit

Permalink
Add tests to verify fix
Browse files Browse the repository at this point in the history
* Tests fail without the fix.
* Tests pass with the fix.
  • Loading branch information
hellofromtonya committed Sep 26, 2022
1 parent 755e7a0 commit 0d6646b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/phpunit/tests/block-supports/wpGetLayoutStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,20 @@ public function data_wp_get_layout_style() {
),
'expected_output' => '.wp-layout{flex-wrap:nowrap;flex-direction:column;align-items:flex-start;}',
),
'default layout with blockGap to verify converting gap value into valid CSS' => array(
'args' => array(
'selector' => '.wp-block-group.wp-container-6',
'layout' => array(
'type' => 'default',
),
'has_block_gap_support' => true,
'gap_value' => 'var:preset|spacing|70',
'block_spacing' => array(
'blockGap' => 'var(--wp--preset--spacing--70)',
),
),
'expected_output' => '.wp-block-group.wp-container-6 > *{margin-block-start:0;margin-block-end:0;}.wp-block-group.wp-container-6.wp-block-group.wp-container-6 > * + *{margin-block-start:var(--wp--preset--spacing--70);margin-block-end:0;}',
),
);
}
}

0 comments on commit 0d6646b

Please sign in to comment.