Changeset 9139 for trunk/tests/phpunit/testcases/groups/functions.php
- Timestamp:
- 11/14/2014 02:01:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/functions.php
r9137 r9139 19 19 20 20 public function test_creating_new_group_as_authenticated_user() { 21 $u = $this-> create_user();21 $u = $this->factory->user->create(); 22 22 wp_set_current_user( $u ); 23 23 … … 30 30 */ 31 31 public function test_total_group_count_groups_join_group() { 32 $u1 = $this-> create_user();33 $u2 = $this-> create_user();32 $u1 = $this->factory->user->create(); 33 $u2 = $this->factory->user->create(); 34 34 $g = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 35 35 … … 43 43 */ 44 44 public function test_total_group_count_groups_leave_group() { 45 $u1 = $this-> create_user();46 $u2 = $this-> create_user();45 $u1 = $this->factory->user->create(); 46 $u2 = $this->factory->user->create(); 47 47 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 48 48 $g2 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); … … 59 59 */ 60 60 public function test_total_group_count_groups_ban_member() { 61 $u1 = $this-> create_user();62 $u2 = $this-> create_user();61 $u1 = $this->factory->user->create(); 62 $u2 = $this->factory->user->create(); 63 63 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 64 64 $g2 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); … … 80 80 */ 81 81 public function test_total_group_count_groups_unban_member() { 82 $u1 = $this-> create_user();83 $u2 = $this-> create_user();82 $u1 = $this->factory->user->create(); 83 $u2 = $this->factory->user->create(); 84 84 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 85 85 $g2 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); … … 103 103 */ 104 104 public function test_total_group_count_groups_accept_invite() { 105 $u1 = $this-> create_user();106 $u2 = $this-> create_user();105 $u1 = $this->factory->user->create(); 106 $u2 = $this->factory->user->create(); 107 107 $g = $this->factory->group->create(); 108 108 groups_invite_user( array( … … 122 122 */ 123 123 public function test_total_group_count_groups_accept_membership_request() { 124 $u = $this-> create_user();124 $u = $this->factory->user->create(); 125 125 $g = $this->factory->group->create(); 126 126 groups_send_membership_request( $u, $g ); … … 136 136 */ 137 137 public function test_total_group_count_groups_remove_member() { 138 $u1 = $this-> create_user();139 $u2 = $this-> create_user();138 $u1 = $this->factory->user->create(); 139 $u2 = $this->factory->user->create(); 140 140 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 141 141 $g2 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); … … 157 157 */ 158 158 public function test_total_member_count_groups_join_group() { 159 $u1 = $this-> create_user();160 $u2 = $this-> create_user();159 $u1 = $this->factory->user->create(); 160 $u2 = $this->factory->user->create(); 161 161 $g = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 162 162 … … 170 170 */ 171 171 public function test_total_member_count_groups_leave_group() { 172 $u1 = $this-> create_user();172 $u1 = $this->factory->user->create(); 173 173 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 174 174 groups_join_group( $g1, $u1 ); … … 183 183 */ 184 184 public function test_total_member_count_groups_ban_member() { 185 $u1 = $this-> create_user();186 $u2 = $this-> create_user();185 $u1 = $this->factory->user->create(); 186 $u2 = $this->factory->user->create(); 187 187 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 188 188 groups_join_group( $g1, $u2 ); … … 202 202 */ 203 203 public function test_total_member_count_groups_unban_member() { 204 $u1 = $this-> create_user();205 $u2 = $this-> create_user();204 $u1 = $this->factory->user->create(); 205 $u2 = $this->factory->user->create(); 206 206 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 207 207 groups_join_group( $g1, $u2 ); … … 223 223 */ 224 224 public function test_total_member_count_groups_accept_invite() { 225 $u1 = $this-> create_user();226 $u2 = $this-> create_user();225 $u1 = $this->factory->user->create(); 226 $u2 = $this->factory->user->create(); 227 227 $g = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 228 228 groups_invite_user( array( … … 242 242 */ 243 243 public function test_total_member_count_groups_accept_membership_request() { 244 $u1 = $this-> create_user();245 $u2 = $this-> create_user();244 $u1 = $this->factory->user->create(); 245 $u2 = $this->factory->user->create(); 246 246 $g = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 247 247 … … 257 257 */ 258 258 public function test_total_member_count_groups_remove_member() { 259 $u1 = $this-> create_user();260 $u2 = $this-> create_user();259 $u1 = $this->factory->user->create(); 260 $u2 = $this->factory->user->create(); 261 261 $g1 = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 262 262 groups_join_group( $g1, $u2 ); … … 276 276 */ 277 277 public function test_total_member_count_groups_create_group() { 278 $u1 = $this-> create_user();278 $u1 = $this->factory->user->create(); 279 279 $g = groups_create_group( array( 280 280 'creator_id' => $u1, … … 602 602 public function test_groups_get_group_cache_different_users() { 603 603 $g = $this->factory->group->create(); 604 $u1 = $this-> create_user();605 $u2 = $this-> create_user();604 $u1 = $this->factory->user->create(); 605 $u2 = $this->factory->user->create(); 606 606 $this->add_user_to_group( $u1, $g ); 607 607 … … 624 624 */ 625 625 public function test_get_invite_count_for_user() { 626 $u1 = $this-> create_user();627 $u2 = $this-> create_user();626 $u1 = $this->factory->user->create(); 627 $u2 = $this->factory->user->create(); 628 628 $g = $this->factory->group->create( array( 'creator_id' => $u1 ) ); 629 629
Note: See TracChangeset
for help on using the changeset viewer.