- Timestamp:
- 12/01/2025 03:42:24 PM (3 months ago)
- Location:
- branches/6.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/comment/wpUpdateCommentCountNow.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.9
-
branches/6.9/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php
r56971 r61337 47 47 } 48 48 49 /** 50 * @ticket 64325 51 */ 52 public function test_only_approved_regular_comments_are_counted() { 53 $post_id = self::factory()->post->create(); 54 55 self::factory()->comment->create( 56 array( 57 'comment_post_ID' => $post_id, 58 'comment_approved' => 0, 59 ) 60 ); 61 self::factory()->comment->create( 62 array( 63 'comment_post_ID' => $post_id, 64 'comment_approved' => 1, 65 ) 66 ); 67 self::factory()->comment->create( 68 array( 69 'comment_post_ID' => $post_id, 70 'comment_type' => 'note', 71 'comment_approved' => 0, 72 ) 73 ); 74 self::factory()->comment->create( 75 array( 76 'comment_post_ID' => $post_id, 77 'comment_type' => 'note', 78 'comment_approved' => 1, 79 ) 80 ); 81 82 $this->assertTrue( wp_update_comment_count_now( $post_id ) ); 83 $this->assertSame( '1', get_comments_number( $post_id ) ); 84 } 85 49 86 public function _return_100() { 50 87 return 100;
Note: See TracChangeset
for help on using the changeset viewer.