Privacy: fix unit tests after [43012].
Props iandunn. See #43546. git-svn-id: https://develop.svn.wordpress.org/trunk@43015 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bf1ddda65f
commit
6173287317
@ -1116,6 +1116,7 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
/**
|
||||
* Testing the `wp_comments_personal_data_exporter()` function.
|
||||
*
|
||||
* @group privacy
|
||||
* @ticket 43440
|
||||
*/
|
||||
public function test_wp_comments_personal_data_exporter() {
|
||||
@ -1130,7 +1131,7 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
'comment_content' => 'Comment',
|
||||
);
|
||||
|
||||
$c = self::factory()->comment->create( $args );
|
||||
$comment_id = self::factory()->comment->create( $args );
|
||||
|
||||
$actual = wp_comments_personal_data_exporter( $args['comment_author_email'] );
|
||||
$expected = $args;
|
||||
@ -1155,12 +1156,13 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
$this->assertSame( $expected['comment_agent'], $actual['data'][0]['data'][4]['value'] );
|
||||
$this->assertSame( $expected['comment_date'], $actual['data'][0]['data'][5]['value'] );
|
||||
$this->assertSame( $expected['comment_content'], $actual['data'][0]['data'][6]['value'] );
|
||||
$this->assertSame( get_comment_link( $c ), $actual['data'][0]['data'][7]['value'] );
|
||||
$this->assertSame( get_comment_link( $comment_id ), strip_tags( $actual['data'][0]['data'][7]['value'] ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing the `wp_comments_personal_data_exporter()` function for no comments found.
|
||||
*
|
||||
* @group privacy
|
||||
* @ticket 43440
|
||||
*/
|
||||
public function test_wp_comments_personal_data_exporter_no_comments_found() {
|
||||
@ -1178,6 +1180,7 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
/**
|
||||
* Testing the `wp_comments_personal_data_exporter()` function for an empty comment property.
|
||||
*
|
||||
* @group privacy
|
||||
* @ticket 43440
|
||||
*/
|
||||
public function test_wp_comments_personal_data_exporter_empty_comment_prop() {
|
||||
@ -1208,6 +1211,7 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
/**
|
||||
* Testing the `wp_comments_personal_data_exporter()` function with an empty second page.
|
||||
*
|
||||
* @group privacy
|
||||
* @ticket 43440
|
||||
*/
|
||||
public function test_wp_comments_personal_data_exporter_empty_second_page() {
|
||||
|
Loading…
Reference in New Issue
Block a user