Changeset 50838 for trunk/tests/phpunit/tests/dependencies/styles.php
- Timestamp:
- 05/11/2021 04:26:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/styles.php
r50836 r50838 423 423 424 424 /** 425 * Tests that the main "style.css" file gets enqueued when the site doesn't opt -in to separate_core_block_assets.425 * Tests that the main "style.css" file gets enqueued when the site doesn't opt in to separate core block assets. 426 426 * 427 427 * @ticket 50263 428 */ 429 function test_common_block_styles_for_viewing_without_split_styles() { 428 * 429 * @covers ::wp_default_styles 430 */ 431 function test_block_styles_for_viewing_without_split_styles() { 430 432 add_filter( 'separate_core_block_assets', '__return_false' ); 431 433 wp_default_styles( $GLOBALS['wp_styles'] ); 432 434 433 435 $this->assertSame( 434 $GLOBALS['wp_styles']->registered['wp-block-library']->src,435 '/' . WPINC . '/css/dist/block-library/style.css'436 '/' . WPINC . '/css/dist/block-library/style.css', 437 $GLOBALS['wp_styles']->registered['wp-block-library']->src 436 438 ); 437 439 } 438 440 439 441 /** 440 * Tests that the "common.css" file gets enqueued when the site opts -in to separate_core_block_assets.442 * Tests that the "common.css" file gets enqueued when the site opts in to separate core block assets. 441 443 * 442 444 * @ticket 50263 443 */ 444 function test_common_block_styles_for_viewing_with_split_styles() { 445 add_filter( 'separate_core_block_assets', '__return_false' ); 446 wp_default_styles( $GLOBALS['wp_styles'] ); 447 448 $this->assertSame( 449 $GLOBALS['wp_styles']->registered['wp-block-library']->src, 450 '/' . WPINC . '/css/dist/block-library/style.css' 451 ); 452 } 453 445 * 446 * @covers ::wp_default_styles 447 */ 454 448 function test_block_styles_for_viewing_with_split_styles() { 455 449 add_filter( 'separate_core_block_assets', '__return_true' ); … … 457 451 458 452 $this->assertSame( 459 $GLOBALS['wp_styles']->registered['wp-block-library']->src,460 '/' . WPINC . '/css/dist/block-library/common.css'453 '/' . WPINC . '/css/dist/block-library/common.css', 454 $GLOBALS['wp_styles']->registered['wp-block-library']->src 461 455 ); 462 456 }
Note: See TracChangeset
for help on using the changeset viewer.