Changeset 55324
- Timestamp:
- 02/13/2023 10:03:30 PM (20 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r55308 r55324 3693 3693 'number' => $number, 3694 3694 'paged' => $page, 3695 'order _by'=> 'comment_ID',3695 'orderby' => 'comment_ID', 3696 3696 'order' => 'ASC', 3697 3697 'update_comment_meta_cache' => false, … … 3816 3816 'number' => $number, 3817 3817 'paged' => $page, 3818 'order _by'=> 'comment_ID',3818 'orderby' => 'comment_ID', 3819 3819 'order' => 'ASC', 3820 3820 'include_unapproved' => true, -
trunk/tests/phpunit/tests/comment/wpCommentsPersonalDataEraser.php
r55322 r55324 230 230 return sprintf( 'Some custom message for comment %d.', $comment->comment_ID ); 231 231 } 232 233 /** 234 * Testing that `wp_comments_personal_data_eraser()` orders comments by ID. 235 * 236 * @ticket 57700 237 */ 238 public function test_wp_comments_personal_data_eraser_orders_comments_by_id() { 239 240 $args = array( 241 'comment_post_ID' => self::$post_id, 242 'comment_author' => 'Comment Author', 243 'comment_author_email' => 'personal@local.host', 244 'comment_author_url' => 'https://local.host/', 245 'comment_author_IP' => '192.168.0.1', 246 'comment_date' => '2018-04-14 17:20:00', 247 'comment_agent' => 'COMMENT_AGENT', 248 'comment_content' => 'Comment Content', 249 ); 250 self::factory()->comment->create( $args ); 251 252 $filter = new MockAction(); 253 add_filter( 'comments_clauses', array( &$filter, 'filter' ) ); 254 255 wp_comments_personal_data_eraser( $args['comment_author_email'] ); 256 257 $clauses = $filter->get_args()[0][0]; 258 259 $this->assertStringContainsString( 'comment_ID', $clauses['orderby'] ); 260 } 232 261 } -
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.