Changeset 42343 for trunk/tests/phpunit/tests/user/countUserPosts.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/countUserPosts.php
r38398 r42343 10 10 11 11 public static function wpSetUpBeforeClass( $factory ) { 12 self::$user_id = $factory->user->create( array( 13 'role' => 'author', 14 'user_login' => 'count_user_posts_user', 15 'user_email' => 'count_user_posts_user@example.com', 16 ) ); 12 self::$user_id = $factory->user->create( 13 array( 14 'role' => 'author', 15 'user_login' => 'count_user_posts_user', 16 'user_email' => 'count_user_posts_user@example.com', 17 ) 18 ); 17 19 18 self::$post_ids = $factory->post->create_many( 4, array( 19 'post_author' => self::$user_id, 20 'post_type' => 'post', 21 ) ); 22 self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 3, array( 23 'post_author' => self::$user_id, 24 'post_type' => 'wptests_pt', 25 ) ) ); 26 self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 2, array( 27 'post_author' => 12345, 28 'post_type' => 'wptests_pt', 29 ) ) ); 20 self::$post_ids = $factory->post->create_many( 21 4, array( 22 'post_author' => self::$user_id, 23 'post_type' => 'post', 24 ) 25 ); 26 self::$post_ids = array_merge( 27 self::$post_ids, $factory->post->create_many( 28 3, array( 29 'post_author' => self::$user_id, 30 'post_type' => 'wptests_pt', 31 ) 32 ) 33 ); 34 self::$post_ids = array_merge( 35 self::$post_ids, $factory->post->create_many( 36 2, array( 37 'post_author' => 12345, 38 'post_type' => 'wptests_pt', 39 ) 40 ) 41 ); 30 42 31 self::$post_ids[] = $factory->post->create( array( 32 'post_author' => 12345, 33 'post_type' => 'wptests_pt', 34 ) ); 43 self::$post_ids[] = $factory->post->create( 44 array( 45 'post_author' => 12345, 46 'post_type' => 'wptests_pt', 47 ) 48 ); 35 49 } 36 50
Note: See TracChangeset
for help on using the changeset viewer.