Changeset 35242 for trunk/tests/phpunit/tests/user/query.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/query.php
r35225 r35242 246 246 */ 247 247 public function test_orderby_clause_key_as_secondary_sort() { 248 $u1 = self:: $factory->user->create( array(248 $u1 = self::factory()->user->create( array( 249 249 'user_registered' => '2015-01-28 03:00:00', 250 250 ) ); 251 $u2 = self:: $factory->user->create( array(251 $u2 = self::factory()->user->create( array( 252 252 'user_registered' => '2015-01-28 05:00:00', 253 253 ) ); 254 $u3 = self:: $factory->user->create( array(254 $u3 = self::factory()->user->create( array( 255 255 'user_registered' => '2015-01-28 03:00:00', 256 256 ) ); … … 599 599 } 600 600 601 $b = self:: $factory->blog->create();601 $b = self::factory()->blog->create(); 602 602 603 603 add_user_to_blog( $b, self::$author_ids[0], 'author' ); … … 625 625 } 626 626 627 $b = self:: $factory->blog->create();627 $b = self::factory()->blog->create(); 628 628 add_user_to_blog( $b, self::$author_ids[0], 'author' ); 629 629 … … 650 650 } 651 651 652 $b = self:: $factory->blog->create();652 $b = self::factory()->blog->create(); 653 653 654 654 add_user_to_blog( $b, self::$author_ids[0], 'subscriber' ); … … 676 676 } 677 677 678 $b = self:: $factory->blog->create();678 $b = self::factory()->blog->create(); 679 679 680 680 add_user_to_blog( $b, self::$author_ids[0], 'subscriber' ); … … 708 708 register_post_type( 'wptests_pt_private', array( 'public' => false ) ); 709 709 710 self:: $factory->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'wptests_pt_public' ) );711 self:: $factory->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'wptests_pt_private' ) );710 self::factory()->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'wptests_pt_public' ) ); 711 self::factory()->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'wptests_pt_private' ) ); 712 712 713 713 $q = new WP_User_Query( array( … … 728 728 register_post_type( 'wptests_pt_private', array( 'public' => false ) ); 729 729 730 self:: $factory->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'wptests_pt_public' ) );731 self:: $factory->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'wptests_pt_private' ) );732 self:: $factory->post->create( array( 'post_author' => self::$author_ids[2], 'post_status' => 'publish', 'post_type' => 'post' ) );730 self::factory()->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'wptests_pt_public' ) ); 731 self::factory()->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'wptests_pt_private' ) ); 732 self::factory()->post->create( array( 'post_author' => self::$author_ids[2], 'post_status' => 'publish', 'post_type' => 'post' ) ); 733 733 734 734 $q = new WP_User_Query( array( … … 749 749 register_post_type( 'wptests_pt_private', array( 'public' => false ) ); 750 750 751 self:: $factory->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'draft', 'post_type' => 'wptests_pt_public' ) );752 self:: $factory->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'inherit', 'post_type' => 'wptests_pt_private' ) );753 self:: $factory->post->create( array( 'post_author' => self::$author_ids[2], 'post_status' => 'publish', 'post_type' => 'post' ) );751 self::factory()->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'draft', 'post_type' => 'wptests_pt_public' ) ); 752 self::factory()->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'inherit', 'post_type' => 'wptests_pt_private' ) ); 753 self::factory()->post->create( array( 'post_author' => self::$author_ids[2], 'post_status' => 'publish', 'post_type' => 'post' ) ); 754 754 755 755 $q = new WP_User_Query( array( … … 771 771 } 772 772 773 $blogs = self:: $factory->blog->create_many( 2 );773 $blogs = self::factory()->blog->create_many( 2 ); 774 774 775 775 add_user_to_blog( $blogs[0], self::$author_ids[0], 'author' ); … … 779 779 780 780 switch_to_blog( $blogs[0] ); 781 self:: $factory->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'post' ) );781 self::factory()->post->create( array( 'post_author' => self::$author_ids[0], 'post_status' => 'publish', 'post_type' => 'post' ) ); 782 782 restore_current_blog(); 783 783 784 784 switch_to_blog( $blogs[1] ); 785 self:: $factory->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'post' ) );785 self::factory()->post->create( array( 'post_author' => self::$author_ids[1], 'post_status' => 'publish', 'post_type' => 'post' ) ); 786 786 restore_current_blog(); 787 787 … … 932 932 */ 933 933 public function test_get_single_role_by_string_which_is_similar() { 934 $another_editor = self:: $factory->user->create( array(934 $another_editor = self::factory()->user->create( array( 935 935 'role' => 'another-editor', 936 936 ) ); … … 1149 1149 } 1150 1150 1151 $sites = self:: $factory->blog->create_many( 2 );1151 $sites = self::factory()->blog->create_many( 2 ); 1152 1152 1153 1153 add_user_to_blog( $sites[0], self::$author_ids[0], 'author' );
Note: See TracChangeset
for help on using the changeset viewer.