Tests: Correct assertion in WP_Test_REST_Comments_Controller::check_comment_data()
.
`author_avatar_urls` should be present in the comment data array keys, not values. The test only passed accidentally due to `assertContains()` not performing a strict type check. See #38266, #50913. git-svn-id: https://develop.svn.wordpress.org/trunk@49051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
21eb2f0d98
commit
e2b74bee82
@ -3244,7 +3244,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
$this->assertSame( mysql_to_rfc3339( $comment->comment_date ), $data['date'] );
|
||||
$this->assertSame( mysql_to_rfc3339( $comment->comment_date_gmt ), $data['date_gmt'] );
|
||||
$this->assertSame( get_comment_link( $comment ), $data['link'] );
|
||||
$this->assertContains( 'author_avatar_urls', $data );
|
||||
$this->assertArrayHasKey( 'author_avatar_urls', $data );
|
||||
$this->assertSameSets(
|
||||
array(
|
||||
'self',
|
||||
|
Loading…
Reference in New Issue
Block a user