Skip to content

Commit ce80e7a

Browse files
committed
Ensure built CSS files are present in tests
1 parent 8cb36ca commit ce80e7a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/phpunit/tests/media.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6677,6 +6677,9 @@ static function () {
66776677
* @dataProvider data_provider_data_provider_to_test_wp_enqueue_img_auto_sizes_contain_css_fix
66786678
*/
66796679
public function test_wp_enqueue_img_auto_sizes_contain_css_fix( ?Closure $set_up, bool $expected, ?string $expected_deprecated = null ): void {
6680+
// This file is created as part of the build process, but the unit tests don't run the build prior to running unit tests on GHA.
6681+
self::touch( ABSPATH . WPINC . '/css/dist/block-library/common.css' );
6682+
66806683
if ( $set_up ) {
66816684
$set_up();
66826685
}

tests/phpunit/tests/template.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,9 @@ function (): void {
16771677
* @dataProvider data_wp_hoist_late_printed_styles
16781678
*/
16791679
public function test_wp_hoist_late_printed_styles( ?Closure $set_up, int $inline_size_limit, array $expected_styles ): void {
1680+
// This file is created as part of the build process, but the unit tests don't run the build prior to running unit tests on GHA.
1681+
self::touch( ABSPATH . WPINC . '/css/dist/block-library/theme.css' );
1682+
16801683
switch_theme( 'default' );
16811684
global $wp_styles;
16821685
$wp_styles = null;

0 commit comments

Comments
 (0)