Tests: Use assertSame() in some newly introduced tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [48937], [48939], [48940], [48944].

See #38266.

git-svn-id: https://develop.svn.wordpress.org/trunk@49547 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-11-09 15:43:14 +00:00
parent 2e01c76841
commit 4eee0d2fb7
12 changed files with 106 additions and 106 deletions
+1 -1
View File
@@ -1763,7 +1763,7 @@ class Tests_Functions extends WP_UnitTestCase {
* @dataProvider data_test_wp_is_json_media_type
*/
public function test_wp_is_json_media_type( $input, $expected ) {
$this->assertEquals( $expected, wp_is_json_media_type( $input ) );
$this->assertSame( $expected, wp_is_json_media_type( $input ) );
}