From 65c7df0344fd76ad91beafc60be5138c74438ea0 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 6 Mar 2023 17:44:15 +0000 Subject: [PATCH] Tests: Use assertSame() in Tests_Theme_wpThemeJson. Change from assertEquals() to assertSame(). Why? To ensure both the return value and data type match the expected results. Follow-up to [55216]. Props costdev, peterwilsoncc, mukesh27, ankitmaru. See #56800, #57621. git-svn-id: https://develop.svn.wordpress.org/trunk@55468 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/theme/wpThemeJson.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index 26d410e322..ddbceeadd1 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -4708,7 +4708,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase { $reflection = new ReflectionMethod( $theme_json, 'process_blocks_custom_css' ); $reflection->setAccessible( true ); - $this->assertEquals( $expected, $reflection->invoke( $theme_json, $input['css'], $input['selector'] ) ); + $this->assertSame( $expected, $reflection->invoke( $theme_json, $input['css'], $input['selector'] ) ); } /**