Changeset 35137
- Timestamp:
- 10/13/2015 03:31:26 PM (9 years ago)
- Location:
- trunk/tests/phpunit/tests/xmlrpc/wp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getPosts.php
r26087 r35137 53 53 54 54 $post_ids = array(); 55 $num_posts = 17;55 $num_posts = 4; 56 56 foreach ( range( 1, $num_posts ) as $i ) { 57 57 $post_ids[] = $this->factory->post->create( array( … … 68 68 // page through results 69 69 $posts_found = array(); 70 $filter['number'] = 5;70 $filter['number'] = 2; 71 71 $filter['offset'] = 0; 72 72 do { … … 79 79 80 80 // add comments to some of the posts 81 $random_posts = array_rand( $post_ids, $num_posts / 2 ); 82 foreach ( $random_posts as $i ) { 83 $post = $post_ids[$i]; 84 $this->factory->comment->create_post_comments( $post, rand( 1, 20 ) ); 81 foreach ( $post_ids as $key => $post_id ) { 82 // Larger post IDs will get more comments. 83 $this->factory->comment->create_post_comments( $post_id, $key ); 85 84 } 86 85 … … 97 96 98 97 // set one of the posts to draft and get drafts 99 $post = get_post( $post_ids[ $random_posts[0]] );98 $post = get_post( $post_ids[0] ); 100 99 $post->post_status = 'draft'; 101 100 wp_update_post( $post ); -
trunk/tests/phpunit/tests/xmlrpc/wp/getUsers.php
r25002 r35137 80 80 grant_super_admin( $administrator_id ); 81 81 82 $this->factory->user->create_many( 13);82 $this->factory->user->create_many( 5 ); 83 83 84 84 $user_ids = get_users( array( 'fields' => 'ID' ) ); 85 85 86 86 $users_found = array(); 87 $page_size = floor( count( $user_ids ) / 3 );87 $page_size = 2; 88 88 89 89 $filter = array( 'number' => $page_size, 'offset' => 0 );
Note: See TracChangeset
for help on using the changeset viewer.