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
This commit is contained in:
Tonya Mork 2023-03-06 17:44:15 +00:00
parent cd9d0eadf1
commit 65c7df0344

View File

@ -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'] ) );
}
/**