From 5d537503dfa0d25ae24da4b8790e60ee9365c4fd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 18 Oct 2022 13:28:59 +0000 Subject: [PATCH] Tests: Correct the `wp_theme_json_data_default` filter name in assertion messages. The `theme_json_default` filter was previously renamed to `wp_theme_json_data_default`. This commit updates the messages in `WP_Theme_JSON_Resolver` tests to match the new name. Follow-up to [54501], [54630]. See #56796, #56835. git-svn-id: https://develop.svn.wordpress.org/trunk@54631 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/theme/wpThemeJsonResolver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index 9e8068c11f..9e7e26cae2 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -396,7 +396,7 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { $expected_filter_count++; } - $this->assertSame( $expected_filter_count, did_filter( 'wp_theme_json_data_default' ), 'The filter "theme_json_default" should fire the given number of times' ); + $this->assertSame( $expected_filter_count, did_filter( 'wp_theme_json_data_default' ), 'The filter "wp_theme_json_data_default" should fire the given number of times' ); $this->assertInstanceOf( WP_Theme_JSON::class, $actual, 'WP_Theme_JSON_Resolver::get_core_data() should return instance of WP_Theme_JSON' ); $this->assertSame( static::$property_core->getValue(), $actual, 'WP_Theme_JSON_Resolver::$core property should be the same object as returned from WP_Theme_JSON_Resolver::get_core_data()' ); } @@ -705,7 +705,7 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { $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. - $this->assertGreaterThan( 0, did_filter( 'wp_theme_json_data_default' ), 'The filter "theme_json_default" should fire.' ); + $this->assertGreaterThan( 0, did_filter( 'wp_theme_json_data_default' ), 'The filter "wp_theme_json_data_default" should fire.' ); // Test that data from theme.json is backfilled from existing theme supports. $previous_settings = $theme_data->get_settings();