Build/Test Tooling: Use assertSame() in Tests_Comment::test_update_comment_from_privileged_user_by_privileged_user().

Change from `assertEquals()` to `assertSame()`. Why? To ensure both the return value and data type match the expected results.

Follow-up to [c].

Props costdev, peterwilsoncc, mukesh27, ankitmaru.
See #56800.

git-svn-id: https://develop.svn.wordpress.org/trunk@55466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Tonya Mork
2023-03-06 15:01:33 +00:00
parent c39d384d33
commit f08a0e2a3b
+1 -1
View File
@@ -161,7 +161,7 @@ class Tests_Comment extends WP_UnitTestCase {
);
$comment = get_comment( $comment_id );
$this->assertEquals( '<a href="http://example.localhost/something.html" rel="nofollow ugc">click</a>', $comment->comment_content, 'Comment: ' . $comment->comment_content );
$this->assertSame( '<a href="http://example.localhost/something.html" rel="nofollow ugc">click</a>', $comment->comment_content, 'Comment: ' . $comment->comment_content );
wp_set_current_user( 0 );
}