Skip to content
Prev Previous commit
Next Next commit
Fix test to now rely on object cache API.
  • Loading branch information
felixarntz committed Nov 13, 2023
commit 40e111af19be4d371ebb1535e8a4c097a7c22ac4
7 changes: 6 additions & 1 deletion tests/phpunit/tests/theme/wpThemeJsonResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,12 @@ public function test_get_theme_data_does_not_parse_theme_json_if_not_present() {
$theme_data = $theme_json_resolver->get_theme_data( array(), array( 'with_supports' => false ) );
$this->assertInstanceOf( 'WP_Theme_JSON', $theme_data, 'Theme data should be an instance of WP_Theme_JSON.' );
$this->assertSame( $empty_theme_json, $theme_data->get_raw_data(), 'Theme data should be empty without theme support.' );
$this->assertNull( $property->getValue(), 'Theme i18n schema should not have been loaded without theme support.' );

// Include an unmodified $wp_version.
require ABSPATH . WPINC . '/version.php';
$cache_group = 'theme_json_files';
$cache_key = "i18n_schema_{$wp_version}";
$this->assertFalse( wp_cache_get( $cache_key, $cache_group ), 'Theme i18n schema should not have been loaded without theme support.' );
}

/**
Expand Down