mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user