Changeset 9139 for trunk/tests/phpunit/testcases/groups/template.php
- Timestamp:
- 11/14/2014 02:01:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/template.php
r9120 r9139 132 132 */ 133 133 public function test_bp_group_has_members_vanilla() { 134 $u1 = $this-> create_user();135 $u2 = $this-> create_user();134 $u1 = $this->factory->user->create(); 135 $u2 = $this->factory->user->create(); 136 136 $g = $this->factory->group->create( array( 137 137 'creator_id' => $u1, … … 160 160 */ 161 161 public function test_bp_group_has_members_backpat_retval_format() { 162 $u1 = $this-> create_user();163 $u2 = $this-> create_user();162 $u1 = $this->factory->user->create(); 163 $u2 = $this->factory->user->create(); 164 164 $g = $this->factory->group->create( array( 'creator_id' => $u2 ) ); 165 165 … … 204 204 $users = array(); 205 205 for ( $i = 1; $i <= 10; $i++ ) { 206 $users[ $i ] = $this-> create_user();206 $users[ $i ] = $this->factory->user->create(); 207 207 } 208 208 … … 242 242 $users = array(); 243 243 for ( $i = 1; $i <= 10; $i++ ) { 244 $users[ $i ] = $this-> create_user();244 $users[ $i ] = $this->factory->user->create(); 245 245 } 246 246 … … 265 265 public function test_bp_group_has_members_with_exclude() { 266 266 $g = $this->factory->group->create(); 267 $u1 = $this-> create_user();268 $u2 = $this-> create_user();267 $u1 = $this->factory->user->create(); 268 $u2 = $this->factory->user->create(); 269 269 270 270 $this->add_user_to_group( $u1, $g ); … … 286 286 public function test_bp_group_has_members_with_exclude_admins_mods_1() { 287 287 $g = $this->factory->group->create(); 288 $u1 = $this-> create_user();289 $u2 = $this-> create_user();290 $u3 = $this-> create_user();288 $u1 = $this->factory->user->create(); 289 $u2 = $this->factory->user->create(); 290 $u3 = $this->factory->user->create(); 291 291 292 292 $this->add_user_to_group( $u1, $g ); … … 313 313 */ 314 314 public function test_bp_group_has_members_with_exclude_admins_mods_0() { 315 $u1 = $this-> create_user();316 $u2 = $this-> create_user();317 $u3 = $this-> create_user();315 $u1 = $this->factory->user->create(); 316 $u2 = $this->factory->user->create(); 317 $u3 = $this->factory->user->create(); 318 318 $g = $this->factory->group->create( array( 319 319 'creator_id' => $u1, … … 348 348 public function test_bp_group_has_members_with_exclude_banned_1() { 349 349 $g = $this->factory->group->create(); 350 $u1 = $this-> create_user();351 $u2 = $this-> create_user();350 $u1 = $this->factory->user->create(); 351 $u2 = $this->factory->user->create(); 352 352 353 353 $this->add_user_to_group( $u1, $g ); … … 371 371 */ 372 372 public function test_bp_group_has_members_with_exclude_banned_0() { 373 $u1 = $this-> create_user();374 $u2 = $this-> create_user();375 $u3 = $this-> create_user();373 $u1 = $this->factory->user->create(); 374 $u2 = $this->factory->user->create(); 375 $u3 = $this->factory->user->create(); 376 376 377 377 $g = $this->factory->group->create( array( … … 409 409 public function test_bp_group_has_members_default_order() { 410 410 $now = time(); 411 $u1 = $this-> create_user( array(411 $u1 = $this->factory->user->create( array( 412 412 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 60 ), 413 413 ) ); 414 $u2 = $this-> create_user( array(414 $u2 = $this->factory->user->create( array( 415 415 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 600 ), 416 416 ) ); 417 $u3 = $this-> create_user( array(417 $u3 = $this->factory->user->create( array( 418 418 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 6000 ), 419 419 ) ); … … 448 448 public function test_bp_group_has_invites_template_structure() { 449 449 $now = time(); 450 $u1 = $this-> create_user( array(450 $u1 = $this->factory->user->create( array( 451 451 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 60 ), 452 452 ) ); 453 $u2 = $this-> create_user( array(453 $u2 = $this->factory->user->create( array( 454 454 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 600 ), 455 455 ) ); 456 $u3 = $this-> create_user( array(456 $u3 = $this->factory->user->create( array( 457 457 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 6000 ), 458 458 ) ); 459 $u4 = $this-> create_user( array(459 $u4 = $this->factory->user->create( array( 460 460 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 60000 ), 461 461 ) ); … … 528 528 */ 529 529 public function test_bp_group_has_invites_pagination() { 530 $u1 = $this-> create_user( array(530 $u1 = $this->factory->user->create( array( 531 531 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 60 ), 532 532 ) ); … … 539 539 $now = time(); 540 540 for ( $i = 1; $i < 15; $i++ ) { 541 $users[ $i ] = $this-> create_user( array(541 $users[ $i ] = $this->factory->user->create( array( 542 542 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - $i ), 543 543 ) ); … … 572 572 public function test_bp_group_has_membership_requests_results() { 573 573 $now = time(); 574 $u1 = $this-> create_user( array(574 $u1 = $this->factory->user->create( array( 575 575 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - 60 ), 576 576 ) ); … … 583 583 $memberships = array(); 584 584 for ( $i = 1; $i < 15; $i++ ) { 585 $users[ $i ] = $this-> create_user( array(585 $users[ $i ] = $this->factory->user->create( array( 586 586 'last_activity' => gmdate( 'Y-m-d H:i:s', $now - ( 100 - $i ) ), 587 587 ) ); … … 636 636 */ 637 637 public function test_bp_group_has_membership_requests_format() { 638 $u1 = $this-> create_user( array(638 $u1 = $this->factory->user->create( array( 639 639 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 60 ), 640 640 ) ); … … 646 646 $time = time(); 647 647 648 $user = $this-> create_user( array(648 $user = $this->factory->user->create( array( 649 649 'last_activity' => gmdate( 'Y-m-d H:i:s', $time ), 650 650 ) ); … … 705 705 public function test_bp_group_is_user_banned_in_groups_loop() { 706 706 $now = time(); 707 $u1 = $this-> create_user( array(707 $u1 = $this->factory->user->create( array( 708 708 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 709 709 ) ); 710 $u2 = $this-> create_user( array(710 $u2 = $this->factory->user->create( array( 711 711 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 712 712 ) ); … … 758 758 public function test_bp_group_is_user_banned_not_in_groups_loop() { 759 759 $now = time(); 760 $u1 = $this-> create_user( array(760 $u1 = $this->factory->user->create( array( 761 761 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 762 762 ) ); 763 $u2 = $this-> create_user( array(763 $u2 = $this->factory->user->create( array( 764 764 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 765 765 ) );
Note: See TracChangeset
for help on using the changeset viewer.