Skip to content

Commit a1c01f1

Browse files
committed
Tests: Clear the theme.json cache before each theme test.
The resolver caches outlive a test class, so the first test of a `WP_Theme_UnitTestCase` class could read theme.json data from the previous class. Clear them in `set_up()` as `tear_down()` already does. See #66755.
1 parent e9b0cd3 commit a1c01f1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/phpunit/tests/theme/base.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function set_up() {
4040

4141
// Clear caches.
4242
wp_clean_themes_cache();
43+
wp_clean_theme_json_cache();
4344
unset( $GLOBALS['wp_themes'] );
4445
}
4546

0 commit comments

Comments
 (0)