- Timestamp:
- 02/13/2023 10:03:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/wpCommentsPersonalDataExporter.php
r55322 r55324 133 133 $this->assertCount( 0, $actual['data'] ); 134 134 } 135 136 /** 137 * Testing that `wp_comments_personal_data_exporter()` orders comments by ID. 138 * 139 * @ticket 57700 140 */ 141 public function test_wp_comments_personal_data_exporter_orders_comments_by_id() { 142 143 $args = array( 144 'comment_post_ID' => self::$post_id, 145 'comment_author' => 'Comment Author', 146 'comment_author_email' => 'personal@local.host', 147 'comment_author_url' => 'https://local.host/', 148 'comment_author_IP' => '192.168.0.1', 149 'comment_date' => '2018-03-28 20:05:00', 150 'comment_agent' => 'SOME_AGENT', 151 'comment_content' => 'Comment', 152 ); 153 self::factory()->comment->create( $args ); 154 155 $filter = new MockAction(); 156 add_filter( 'comments_clauses', array( &$filter, 'filter' ) ); 157 158 wp_comments_personal_data_exporter( $args['comment_author_email'] ); 159 160 $clauses = $filter->get_args()[0][0]; 161 162 $this->assertStringContainsString( 'comment_ID', $clauses['orderby'] ); 163 } 135 164 }
Note: See TracChangeset
for help on using the changeset viewer.