Changeset 35123 for trunk/tests/phpunit/tests/user/query.php
- Timestamp:
- 10/13/2015 03:25:42 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/query.php
r35114 r35123 439 439 */ 440 440 function test_number() { 441 $user_ids = $this->factory->user->create_many( 10 ); 441 // +1 for the default user created by the test suite. 442 $user_ids = $this->factory->user->create_many( 3 ); 442 443 443 444 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) ); 444 445 $users = $users->get_results(); 445 446 $this->assertEquals( 12, count( $users ) ); 446 $this->assertEquals( 4, count( $users ) ); 447 447 448 448 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id(), 'number' => 10 ) ); 449 449 $users = $users->get_results(); 450 $this->assertEquals( 10, count( $users ) ); 450 $this->assertEquals( 4, count( $users ) ); 451 452 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id(), 'number' => 2 ) ); 453 $users = $users->get_results(); 454 $this->assertEquals( 2, count( $users ) ); 451 455 452 456 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id(), 'number' => -1 ) ); 453 457 $users = $users->get_results(); 454 $this->assertEquals( 12, count( $users ) );458 $this->assertEquals( 4, count( $users ) ); 455 459 } 456 460
Note: See TracChangeset
for help on using the changeset viewer.