Tests: Fix tests introduced in [55612].

In [55612] a change was added that made two unit tests fail. Fix these test by forcing `get_merged_data` method to run.  

Props spacedmonkey, mukesh27.
See #57814.

git-svn-id: https://develop.svn.wordpress.org/trunk@55613 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonny Harris
2023-03-30 12:15:36 +00:00
parent e0a3b78cf1
commit 7e1e0005ad
2 changed files with 3 additions and 1 deletions

View File

@@ -729,7 +729,8 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase {
public function test_get_theme_data_theme_supports_overrides_theme_json() {
// Test that get_theme_data() returns a WP_Theme_JSON object.
$theme_json_resolver = new WP_Theme_JSON_Resolver();
$theme_data = $theme_json_resolver->get_theme_data();
$theme_json_resolver->get_merged_data();
$theme_data = $theme_json_resolver->get_theme_data();
$this->assertInstanceOf( 'WP_Theme_JSON', $theme_data, 'Theme data should be an instance of WP_Theme_JSON.' );
// Test that wp_theme_json_data_theme filter has been called.

View File

@@ -131,6 +131,7 @@ EOF;
switch_theme( $theme_name );
do_action( 'after_setup_theme' );
wp_clean_theme_json_cache();
do_action( 'plugins_loaded' );
do_action( 'wp_loaded' );
do_action( 'wp_enqueue_scripts' );
}