From 9d34c5660c3e02ecb2ddd24ef4609588d08a2622 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 21 Oct 2024 15:02:40 +1100 Subject: [PATCH] Fix your tests, man! --- phpunit/class-wp-theme-json-resolver-test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpunit/class-wp-theme-json-resolver-test.php b/phpunit/class-wp-theme-json-resolver-test.php index 614be1a403a3a9..bed1a171263f4b 100644 --- a/phpunit/class-wp-theme-json-resolver-test.php +++ b/phpunit/class-wp-theme-json-resolver-test.php @@ -1369,8 +1369,8 @@ public function test_get_resolved_theme_uris() { $this->assertSame( $expected_data, $actual, 'Resolved theme uris do not match.' ); // Test that resolved theme uris are cached. - $current_stylesheet_directory = get_stylesheet_directory(); - $expected_cache_data = array( "$current_stylesheet_directory" => $actual ); + $cache_key = md5( wp_json_encode( $theme_json->get_raw_data() ) ); + $expected_cache_data = array( "$cache_key" => $actual ); $this->assertSame( $expected_cache_data, static::$property_resolved_theme_uris_cache->getValue(), 'Resolved theme uris cache data does not match.' ); }