Changeset 50836 for trunk/tests/phpunit/tests/dependencies/styles.php
- Timestamp:
- 05/11/2021 09:41:48 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/styles.php
r50287 r50836 421 421 $this->assertTrue( wp_style_is( 'wp-block-library-theme' ) ); 422 422 } 423 424 /** 425 * Tests that the main "style.css" file gets enqueued when the site doesn't opt-in to separate_core_block_assets. 426 * 427 * @ticket 50263 428 */ 429 function test_common_block_styles_for_viewing_without_split_styles() { 430 add_filter( 'separate_core_block_assets', '__return_false' ); 431 wp_default_styles( $GLOBALS['wp_styles'] ); 432 433 $this->assertSame( 434 $GLOBALS['wp_styles']->registered['wp-block-library']->src, 435 '/' . WPINC . '/css/dist/block-library/style.css' 436 ); 437 } 438 439 /** 440 * Tests that the "common.css" file gets enqueued when the site opts-in to separate_core_block_assets. 441 * 442 * @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 454 function test_block_styles_for_viewing_with_split_styles() { 455 add_filter( 'separate_core_block_assets', '__return_true' ); 456 wp_default_styles( $GLOBALS['wp_styles'] ); 457 458 $this->assertSame( 459 $GLOBALS['wp_styles']->registered['wp-block-library']->src, 460 '/' . WPINC . '/css/dist/block-library/common.css' 461 ); 462 } 423 463 }
Note: See TracChangeset
for help on using the changeset viewer.