mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Correctly populate the user_id field for comments when a user submits a comment while logged in.
Props imath Fixes #34493 git-svn-id: https://develop.svn.wordpress.org/trunk@35435 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -176,6 +176,7 @@ class Tests_Comment_Submission extends WP_UnitTestCase {
|
||||
$this->assertSame( $user->display_name, $comment->comment_author );
|
||||
$this->assertSame( $user->user_email, $comment->comment_author_email );
|
||||
$this->assertSame( $user->user_url, $comment->comment_author_url );
|
||||
$this->assertSame( $user->ID, intval( $comment->user_id ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -198,6 +199,7 @@ class Tests_Comment_Submission extends WP_UnitTestCase {
|
||||
$this->assertSame( 'Comment Author', $comment->comment_author );
|
||||
$this->assertSame( 'comment@example.org', $comment->comment_author_email );
|
||||
$this->assertSame( 'http://user.example.org', $comment->comment_author_url );
|
||||
$this->assertSame( '0', $comment->user_id );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user