mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user