- Timestamp:
- 05/30/2024 01:14:15 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-supports/wpGetLayoutStyle.php
r55201 r58241 19 19 * @dataProvider data_wp_get_layout_style 20 20 * @ticket 56467 21 * @ticket 61165 21 22 * 22 23 * @param array $args Dataset to test. … … 73 74 'gap_value' => '1em', 74 75 ), 75 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout .wp-layout> * + *{margin-block-start:1em;margin-block-end:0;}',76 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout > * + *{margin-block-start:1em;margin-block-end:0;}', 76 77 ), 77 78 'skip serialization should return empty value' => array( … … 90 91 'gap_value' => array( 'top' => '1em' ), 91 92 ), 92 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout .wp-layout> * + *{margin-block-start:1em;margin-block-end:0;}',93 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout > * + *{margin-block-start:1em;margin-block-end:0;}', 93 94 ), 94 95 'constrained layout with sizes' => array( … … 129 130 'gap_value' => '2.5rem', 130 131 ), 131 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout .wp-layout> * + *{margin-block-start:2.5rem;margin-block-end:0;}',132 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout > * + *{margin-block-start:2.5rem;margin-block-end:0;}', 132 133 ), 133 134 'constrained layout with axial block gap support' => array( … … 140 141 'gap_value' => array( 'top' => '2.5rem' ), 141 142 ), 142 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout .wp-layout> * + *{margin-block-start:2.5rem;margin-block-end:0;}',143 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout > * + *{margin-block-start:2.5rem;margin-block-end:0;}', 143 144 ), 144 145 'constrained layout with block gap support and spacing preset' => array( … … 151 152 'gap_value' => 'var:preset|spacing|50', 152 153 ), 153 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout .wp-layout> * + *{margin-block-start:var(--wp--preset--spacing--50);margin-block-end:0;}',154 'expected_output' => '.wp-layout > *{margin-block-start:0;margin-block-end:0;}.wp-layout > * + *{margin-block-start:var(--wp--preset--spacing--50);margin-block-end:0;}', 154 155 ), 155 156 'flex layout with no args should return empty value' => array( … … 249 250 'expected_output' => '.wp-layout{flex-wrap:nowrap;flex-direction:column;align-items:flex-start;justify-content:flex-end;}', 250 251 ), 252 'default grid layout' => array( 253 'args' => array( 254 'selector' => '.wp-layout', 255 'layout' => array( 256 'type' => 'grid', 257 ), 258 ), 259 'expected_output' => '.wp-layout{grid-template-columns:repeat(auto-fill, minmax(min(12rem, 100%), 1fr));container-type:inline-size;}', 260 ), 261 'grid layout with columnCount' => array( 262 'args' => array( 263 'selector' => '.wp-layout', 264 'layout' => array( 265 'type' => 'grid', 266 'columnCount' => 3, 267 ), 268 ), 269 'expected_output' => '.wp-layout{grid-template-columns:repeat(3, minmax(0, 1fr));}', 270 ), 251 271 'default layout with blockGap to verify converting gap value into valid CSS' => array( 252 272 'args' => array( … … 261 281 ), 262 282 ), 263 '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;}',283 'expected_output' => '.wp-block-group.wp-container-6 > *{margin-block-start:0;margin-block-end:0;}.wp-block-group.wp-container-6 > * + *{margin-block-start:var(--wp--preset--spacing--70);margin-block-end:0;}', 264 284 ), 265 285 );
Note: See TracChangeset
for help on using the changeset viewer.