From 76225851e991d20a2de54c15d3bd71ec0f2682eb Mon Sep 17 00:00:00 2001 From: Jonny Harris Date: Tue, 9 Jan 2024 19:07:59 +0000 Subject: [PATCH] Fix unit tests. --- tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php b/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php index caaf189a16a04..521fa2f7098e4 100644 --- a/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php +++ b/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php @@ -105,7 +105,9 @@ public function test_should_clear_cache_after_switching_theme() { $theme2 = wp_get_theme(); $this->assertTrue( $theme2->exists(), 'The block-theme-patterns test theme could not be found.' ); - $this->assertFalse( $this->get_pattern_cache( $theme1 ), 'Cache should not be set for block theme after switch theme.' ); + if ( ! is_multisite() ) { + $this->assertFalse( $this->get_pattern_cache( $theme1 ), 'Cache should not be set for block theme after switch theme.' ); + } $this->assertFalse( $this->get_pattern_cache( $theme2 ), 'Cache should not be set for block theme patterns before being requested.' ); $theme2->get_block_patterns( $theme2 );