- Timestamp:
- 11/03/2017 07:44:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/class-bp-group-extension.php
r11091 r11737 223 223 $old_options_nav = buddypress()->bp_options_nav; 224 224 225 $g = $this->factory->group->create();225 $g = self::factory()->group->create(); 226 226 $g_obj = groups_get_group( $g ); 227 227 … … 246 246 $old_options_nav = buddypress()->bp_options_nav; 247 247 248 $g = $this->factory->group->create();248 $g = self::factory()->group->create(); 249 249 $g_obj = groups_get_group( $g ); 250 250 … … 270 270 $old_current_user = get_current_user_id(); 271 271 272 $g = $this->factory->group->create( array(272 $g = self::factory()->group->create( array( 273 273 'status' => 'private', 274 274 ) ); … … 288 288 289 289 // Test as group member 290 $u = $this->factory->user->create();290 $u = self::factory()->user->create(); 291 291 $this->set_current_user( $u ); 292 292 $this->add_user_to_group( $u, $g ); … … 314 314 $old_current_user = get_current_user_id(); 315 315 316 $g = $this->factory->group->create( array(316 $g = self::factory()->group->create( array( 317 317 'status' => 'private', 318 318 ) ); … … 332 332 333 333 // Test as group member 334 $u = $this->factory->user->create();334 $u = self::factory()->user->create(); 335 335 $this->set_current_user( $u ); 336 336 $this->add_user_to_group( $u, $g ); … … 350 350 $old_current_user = get_current_user_id(); 351 351 352 $g = $this->factory->group->create( array(352 $g = self::factory()->group->create( array( 353 353 'status' => 'public', 354 354 ) ); … … 376 376 $this->set_current_user( 0 ); 377 377 378 $g = $this->factory->group->create( array(378 $g = self::factory()->group->create( array( 379 379 'status' => 'public', 380 380 ) ); … … 413 413 */ 414 414 public function test_user_can_visit_explicit_for_logged_in_user() { 415 $g = $this->factory->group->create( array(416 'status' => 'public', 417 ) ); 418 $g_obj = groups_get_group( $g ); 419 420 $u = $this->factory->user->create();415 $g = self::factory()->group->create( array( 416 'status' => 'public', 417 ) ); 418 $g_obj = groups_get_group( $g ); 419 420 $u = self::factory()->user->create(); 421 421 $old_current_user = get_current_user_id(); 422 422 $this->set_current_user( $u ); … … 455 455 */ 456 456 public function test_user_can_visit_explicit_for_group_member() { 457 $g = $this->factory->group->create( array(458 'status' => 'public', 459 ) ); 460 $g_obj = groups_get_group( $g ); 461 462 $u = $this->factory->user->create();457 $g = self::factory()->group->create( array( 458 'status' => 'public', 459 ) ); 460 $g_obj = groups_get_group( $g ); 461 462 $u = self::factory()->user->create(); 463 463 $old_current_user = get_current_user_id(); 464 464 $this->set_current_user( $u ); … … 499 499 */ 500 500 public function test_user_can_visit_explicit_for_group_mod() { 501 $g = $this->factory->group->create( array(502 'status' => 'public', 503 ) ); 504 $g_obj = groups_get_group( $g ); 505 506 $u = $this->factory->user->create();501 $g = self::factory()->group->create( array( 502 'status' => 'public', 503 ) ); 504 $g_obj = groups_get_group( $g ); 505 506 $u = self::factory()->user->create(); 507 507 $old_current_user = get_current_user_id(); 508 508 $this->set_current_user( $u ); … … 545 545 */ 546 546 public function test_user_can_visit_explicit_for_group_admin() { 547 $g = $this->factory->group->create( array(548 'status' => 'public', 549 ) ); 550 $g_obj = groups_get_group( $g ); 551 552 $u = $this->factory->user->create();547 $g = self::factory()->group->create( array( 548 'status' => 'public', 549 ) ); 550 $g_obj = groups_get_group( $g ); 551 552 $u = self::factory()->user->create(); 553 553 $old_current_user = get_current_user_id(); 554 554 $this->set_current_user( $u ); … … 591 591 */ 592 592 public function test_user_can_see_nav_item_implied() { 593 $g = $this->factory->group->create( array(593 $g = self::factory()->group->create( array( 594 594 'status' => 'public', 595 595 ) ); … … 632 632 */ 633 633 public function test_user_can_see_nav_item_explicit_for_logged_out_user() { 634 $g = $this->factory->group->create( array(634 $g = self::factory()->group->create( array( 635 635 'status' => 'public', 636 636 ) ); … … 673 673 */ 674 674 public function test_user_can_see_nav_item_explicit_for_logged_in_user() { 675 $g = $this->factory->group->create( array(676 'status' => 'public', 677 ) ); 678 $g_obj = groups_get_group( $g ); 679 680 $u = $this->factory->user->create();675 $g = self::factory()->group->create( array( 676 'status' => 'public', 677 ) ); 678 $g_obj = groups_get_group( $g ); 679 680 $u = self::factory()->user->create(); 681 681 $old_current_user = get_current_user_id(); 682 682 $this->set_current_user( $u ); … … 715 715 */ 716 716 public function test_user_can_see_nav_item_explicit_for_group_member() { 717 $g = $this->factory->group->create( array(718 'status' => 'public', 719 ) ); 720 $g_obj = groups_get_group( $g ); 721 722 $u = $this->factory->user->create();717 $g = self::factory()->group->create( array( 718 'status' => 'public', 719 ) ); 720 $g_obj = groups_get_group( $g ); 721 722 $u = self::factory()->user->create(); 723 723 $old_current_user = get_current_user_id(); 724 724 $this->set_current_user( $u ); … … 759 759 */ 760 760 public function test_user_can_see_nav_item_explicit_for_group_mod() { 761 $g = $this->factory->group->create( array(762 'status' => 'public', 763 ) ); 764 $g_obj = groups_get_group( $g ); 765 766 $u = $this->factory->user->create();761 $g = self::factory()->group->create( array( 762 'status' => 'public', 763 ) ); 764 $g_obj = groups_get_group( $g ); 765 766 $u = self::factory()->user->create(); 767 767 $old_current_user = get_current_user_id(); 768 768 $this->set_current_user( $u ); … … 805 805 */ 806 806 public function test_user_can_see_nav_item_explicit_for_group_admin() { 807 $g = $this->factory->group->create( array(808 'status' => 'public', 809 ) ); 810 $g_obj = groups_get_group( $g ); 811 812 $u = $this->factory->user->create();807 $g = self::factory()->group->create( array( 808 'status' => 'public', 809 ) ); 810 $g_obj = groups_get_group( $g ); 811 812 $u = self::factory()->user->create(); 813 813 $old_current_user = get_current_user_id(); 814 814 $this->set_current_user( $u ); … … 851 851 */ 852 852 public function test_widget_on_group_home_page() { 853 $g = $this->factory->group->create( array(853 $g = self::factory()->group->create( array( 854 854 'status' => 'public', 855 855 ) ); … … 872 872 */ 873 873 public function test_widget_on_group_members_page() { 874 $g = $this->factory->group->create( array(874 $g = self::factory()->group->create( array( 875 875 'status' => 'public', 876 876 ) );
Note: See TracChangeset
for help on using the changeset viewer.