From f08a0e2a3b1860930c853f81cd997adffc341108 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 6 Mar 2023 15:01:33 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/comment.php b/tests/phpunit/tests/comment.php index a55ddd59e7..7858097f73 100644 --- a/tests/phpunit/tests/comment.php +++ b/tests/phpunit/tests/comment.php @@ -161,7 +161,7 @@ class Tests_Comment extends WP_UnitTestCase { ); $comment = get_comment( $comment_id ); - $this->assertEquals( 'click', $comment->comment_content, 'Comment: ' . $comment->comment_content ); + $this->assertSame( 'click', $comment->comment_content, 'Comment: ' . $comment->comment_content ); wp_set_current_user( 0 ); }