mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Use assertSame() in Tests_Comment
See #57855. git-svn-id: https://develop.svn.wordpress.org/trunk@56221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aa5f91a182
commit
434dd6be91
@ -60,7 +60,8 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
$this->assertSame( 1, $result );
|
||||
|
||||
$comment = get_comment( $comments[0] );
|
||||
$this->assertEquals( $comments[1], $comment->comment_parent );
|
||||
// The factory returns ints, but get_comment returns strings
|
||||
$this->assertSame( (string) $comments[1], $comment->comment_parent );
|
||||
|
||||
$result = wp_update_comment(
|
||||
array(
|
||||
@ -78,7 +79,8 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$comment = get_comment( $comments[0] );
|
||||
$this->assertEquals( $post2->ID, $comment->comment_post_ID );
|
||||
// The factory returns ints, but get_comment returns strings
|
||||
$this->assertSame( (string) $post2->ID, $comment->comment_post_ID );
|
||||
}
|
||||
|
||||
public function test_update_comment_from_privileged_user_by_privileged_user() {
|
||||
@ -221,7 +223,7 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$comment = get_comment( $comment_id );
|
||||
$this->assertEquals( 1, $comment->user_id );
|
||||
$this->assertSame( "1", $comment->user_id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user