- Timestamp:
- 11/03/2024 06:19:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/class-bp-group-extension.php
r13980 r14070 241 241 $this->go_to( bp_get_group_url( $g_obj ) ); 242 242 243 self::set_current_user( 0 );243 wp_set_current_user( 0 ); 244 244 245 245 $e = new BPTest_Group_Extension_Inferred_Access_Settings_EnableNavItem_True(); … … 251 251 $this->assertFalse( $e2->user_can_visit() ); 252 252 253 self::set_current_user( $old_current_user );253 wp_set_current_user( $old_current_user ); 254 254 } 255 255 … … 260 260 $this->set_permalink_structure( '/%postname%/' ); 261 261 $old_current_user = get_current_user_id(); 262 self::set_current_user( 0 );262 wp_set_current_user( 0 ); 263 263 264 264 $g = self::factory()->group->create( array( … … 292 292 $this->assertFalse( $e6->user_can_visit() ); 293 293 294 self::set_current_user( $old_current_user );294 wp_set_current_user( $old_current_user ); 295 295 } 296 296 … … 307 307 $u = self::factory()->user->create(); 308 308 $old_current_user = get_current_user_id(); 309 self::set_current_user( $u );309 wp_set_current_user( $u ); 310 310 311 311 $this->go_to( bp_get_group_url( $g_obj ) ); … … 335 335 $this->assertFalse( $e6->user_can_visit() ); 336 336 337 self::set_current_user( $old_current_user );337 wp_set_current_user( $old_current_user ); 338 338 } 339 339 … … 350 350 $u = self::factory()->user->create(); 351 351 $old_current_user = get_current_user_id(); 352 self::set_current_user( $u );352 wp_set_current_user( $u ); 353 353 354 354 $this->add_user_to_group( $u, $g ); … … 380 380 $this->assertFalse( $e6->user_can_visit() ); 381 381 382 self::set_current_user( $old_current_user );382 wp_set_current_user( $old_current_user ); 383 383 } 384 384 … … 395 395 $u = self::factory()->user->create(); 396 396 $old_current_user = get_current_user_id(); 397 self::set_current_user( $u );397 wp_set_current_user( $u ); 398 398 399 399 $m = $this->add_user_to_group( $u, $g ); … … 427 427 $this->assertFalse( $e6->user_can_visit() ); 428 428 429 self::set_current_user( $old_current_user );429 wp_set_current_user( $old_current_user ); 430 430 } 431 431 … … 442 442 $u = self::factory()->user->create(); 443 443 $old_current_user = get_current_user_id(); 444 self::set_current_user( $u );444 wp_set_current_user( $u ); 445 445 446 446 $m = $this->add_user_to_group( $u, $g ); … … 474 474 $this->assertFalse( $e6->user_can_visit() ); 475 475 476 self::set_current_user( $old_current_user );476 wp_set_current_user( $old_current_user ); 477 477 } 478 478 … … 488 488 489 489 $old_current_user = get_current_user_id(); 490 self::set_current_user( 0 );490 wp_set_current_user( 0 ); 491 491 492 492 $this->go_to( bp_get_group_url( $g_obj ) ); … … 516 516 $this->assertFalse( $e6->user_can_visit() ); 517 517 518 self::set_current_user( $old_current_user );518 wp_set_current_user( $old_current_user ); 519 519 } 520 520 … … 530 530 531 531 $old_current_user = get_current_user_id(); 532 self::set_current_user( 0 );532 wp_set_current_user( 0 ); 533 533 534 534 $this->go_to( bp_get_group_url( $g_obj ) ); … … 558 558 $this->assertFalse( $e6->user_can_see_nav_item() ); 559 559 560 self::set_current_user( $old_current_user );560 wp_set_current_user( $old_current_user ); 561 561 } 562 562 … … 573 573 $u = self::factory()->user->create(); 574 574 $old_current_user = get_current_user_id(); 575 self::set_current_user( $u );575 wp_set_current_user( $u ); 576 576 577 577 $this->go_to( bp_get_group_url( $g_obj ) ); … … 601 601 $this->assertFalse( $e6->user_can_see_nav_item() ); 602 602 603 self::set_current_user( $old_current_user );603 wp_set_current_user( $old_current_user ); 604 604 } 605 605 … … 616 616 $u = self::factory()->user->create(); 617 617 $old_current_user = get_current_user_id(); 618 self::set_current_user( $u );618 wp_set_current_user( $u ); 619 619 620 620 $this->add_user_to_group( $u, $g ); … … 646 646 $this->assertFalse( $e6->user_can_see_nav_item() ); 647 647 648 self::set_current_user( $old_current_user );648 wp_set_current_user( $old_current_user ); 649 649 } 650 650 … … 661 661 $u = self::factory()->user->create(); 662 662 $old_current_user = get_current_user_id(); 663 self::set_current_user( $u );663 wp_set_current_user( $u ); 664 664 665 665 $this->add_user_to_group( $u, $g ); … … 693 693 $this->assertFalse( $e6->user_can_see_nav_item() ); 694 694 695 self::set_current_user( $old_current_user );695 wp_set_current_user( $old_current_user ); 696 696 } 697 697 … … 708 708 $u = self::factory()->user->create(); 709 709 $old_current_user = get_current_user_id(); 710 self::set_current_user( $u );710 wp_set_current_user( $u ); 711 711 712 712 $this->add_user_to_group( $u, $g ); … … 740 740 $this->assertFalse( $e6->user_can_see_nav_item() ); 741 741 742 self::set_current_user( $old_current_user );742 wp_set_current_user( $old_current_user ); 743 743 } 744 744
Note: See TracChangeset
for help on using the changeset viewer.