Changeset 55909 for trunk/tests/phpunit/tests/dependencies/styles.php
- Timestamp:
- 06/13/2023 09:51:11 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/styles.php
r55888 r55909 539 539 540 540 /** 541 * @ticket 58394 542 * 543 * @covers ::wp_maybe_inline_styles 544 */ 545 public function test_wp_maybe_inline_styles_dequeue_styles() { 546 $filter = new MockAction(); 547 add_filter( 'pre_wp_filesize', array( $filter, 'filter' ) ); 548 wp_register_style( 'test-handle', '/' . WPINC . '/css/classic-themes.css' ); 549 wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/classic-themes.css' ); 550 551 wp_enqueue_style( 'test-handle' ); 552 553 wp_deregister_style( 'test-handle' ); 554 555 wp_maybe_inline_styles(); 556 557 $this->assertSame( 0, $filter->get_call_count() ); 558 } 559 560 /** 541 561 * wp_filesize should be only be called once, as on the second run of wp_maybe_inline_styles, 542 562 * src will be set to false and filesize will not be requested.
Note: See TracChangeset
for help on using the changeset viewer.