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 [49904], [49925], [49992], [50012], [50013], [50065], [50075], [50131], [50150], [50157].

See #38266, #52482.

git-svn-id: https://develop.svn.wordpress.org/trunk@50284 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-02-10 13:24:24 +00:00
parent 62d5c54b67
commit 3d259c2b22
12 changed files with 70 additions and 70 deletions

View File

@@ -468,7 +468,7 @@ class Tests_Auth extends WP_UnitTestCase {
wp_validate_application_password( null ),
'Application passwords should be allowed for API authentication'
);
$this->assertEquals( $item['uuid'], rest_get_authenticated_app_password() );
$this->assertSame( $item['uuid'], rest_get_authenticated_app_password() );
}
/**