Changeset 49603 for trunk/tests/phpunit/tests/query/commentCount.php
- Timestamp:
- 11/15/2020 01:59:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/commentCount.php
r49184 r49603 19 19 } 20 20 21 public static function wpSetUpBeforeClass( $factory ) {22 $post_id = self::factory()->post->create(21 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 22 $post_id = $factory->post->create( 23 23 array( 24 24 'post_content' => 1 . rand_str() . ' about', … … 27 27 ); 28 28 self::$post_ids[1][] = $post_id; 29 self::factory()->comment->create( array( 'comment_post_ID' => $post_id ) );30 31 $post_id = self::factory()->post->create(29 $factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 30 31 $post_id = $factory->post->create( 32 32 array( 33 33 'post_content' => 1 . rand_str() . ' about', … … 37 37 self::$post_ids[4][] = $post_id; 38 38 for ( $i = 0; $i < 4; $i++ ) { 39 self::factory()->comment->create( array( 'comment_post_ID' => $post_id ) );40 } 41 42 $post_id = self::factory()->post->create(39 $factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 40 } 41 42 $post_id = $factory->post->create( 43 43 array( 44 44 'post_content' => 1 . rand_str() . ' about', … … 48 48 self::$post_ids[5][] = $post_id; 49 49 for ( $i = 0; $i < 5; $i++ ) { 50 self::factory()->comment->create( array( 'comment_post_ID' => $post_id ) );51 } 52 53 $post_id = self::factory()->post->create(50 $factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 51 } 52 53 $post_id = $factory->post->create( 54 54 array( 55 55 'post_content' => 1 . rand_str() . ' about', … … 59 59 self::$post_ids[5][] = $post_id; 60 60 for ( $i = 0; $i < 5; $i++ ) { 61 self::factory()->comment->create( array( 'comment_post_ID' => $post_id ) );61 $factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 62 62 } 63 63 }
Note: See TracChangeset
for help on using the changeset viewer.