Changeset 58896 for trunk/tests/phpunit/tests/theme/wpThemeJson.php
- Timestamp:
- 08/14/2024 06:55:26 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeJson.php
r58890 r58896 5244 5244 /** 5245 5245 * @ticket 61165 5246 * @ticket 61769 5246 5247 * 5247 5248 * @dataProvider data_process_blocks_custom_css … … 5271 5272 return array( 5272 5273 // Simple CSS without any nested selectors. 5274 'empty css' => array( 5275 'input' => array( 5276 'selector' => '.foo', 5277 'css' => '', 5278 ), 5279 'expected' => '', 5280 ), 5273 5281 'no nested selectors' => array( 5274 5282 'input' => array( … … 5286 5294 'expected' => ':root :where(.foo){color: red; margin: auto;}:root :where(.foo.one){color: blue;}:root :where(.foo .two){color: green;}', 5287 5295 ), 5296 'no root styles' => array( 5297 'input' => array( 5298 'selector' => '.foo', 5299 'css' => '&::before{color: red;}', 5300 ), 5301 'expected' => ':root :where(.foo)::before{color: red;}', 5302 ), 5288 5303 // CSS with pseudo elements. 5289 5304 'with pseudo elements' => array( … … 5292 5307 'css' => 'color: red; margin: auto; &::before{color: blue;} & ::before{color: green;} &.one::before{color: yellow;} & .two::before{color: purple;}', 5293 5308 ), 5294 'expected' => ':root :where(.foo){color: red; margin: auto;}:root :where(.foo ::before){color: blue;}:root :where(.foo ::before){color: green;}:root :where(.foo.one::before){color: yellow;}:root :where(.foo .two::before){color: purple;}',5309 'expected' => ':root :where(.foo){color: red; margin: auto;}:root :where(.foo)::before{color: blue;}:root :where(.foo) ::before{color: green;}:root :where(.foo.one)::before{color: yellow;}:root :where(.foo .two)::before{color: purple;}', 5295 5310 ), 5296 5311 // CSS with multiple root selectors. … … 5300 5315 'css' => 'color: red; margin: auto; &.one{color: blue;} & .two{color: green;} &::before{color: yellow;} & ::before{color: purple;} &.three::before{color: orange;} & .four::before{color: skyblue;}', 5301 5316 ), 5302 'expected' => ':root :where(.foo, .bar){color: red; margin: auto;}:root :where(.foo.one, .bar.one){color: blue;}:root :where(.foo .two, .bar .two){color: green;}:root :where(.foo ::before, .bar::before){color: yellow;}:root :where(.foo ::before, .bar ::before){color: purple;}:root :where(.foo.three::before, .bar.three::before){color: orange;}:root :where(.foo .four::before, .bar .four::before){color: skyblue;}',5317 'expected' => ':root :where(.foo, .bar){color: red; margin: auto;}:root :where(.foo.one, .bar.one){color: blue;}:root :where(.foo .two, .bar .two){color: green;}:root :where(.foo, .bar)::before{color: yellow;}:root :where(.foo, .bar) ::before{color: purple;}:root :where(.foo.three, .bar.three)::before{color: orange;}:root :where(.foo .four, .bar .four)::before{color: skyblue;}', 5303 5318 ), 5304 5319 );
Note: See TracChangeset
for help on using the changeset viewer.