WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/29/2015 09:28:39 PM (6 years ago)
Author:
johnbillion
Message:

Correctly populate the user_id field for comments when a user submits a comment while logged in.

Props imath
Fixes #34493

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment-submission.php

    r35244 r35435  
    177177        $this->assertSame( $user->user_email, $comment->comment_author_email );
    178178        $this->assertSame( $user->user_url, $comment->comment_author_url );
     179        $this->assertSame( $user->ID, intval( $comment->user_id ) );
    179180
    180181    }
     
    199200        $this->assertSame( 'comment@example.org', $comment->comment_author_email );
    200201        $this->assertSame( 'http://user.example.org', $comment->comment_author_url );
     202        $this->assertSame( '0', $comment->user_id );
    201203
    202204    }
Note: See TracChangeset for help on using the changeset viewer.