- Timestamp:
- 03/15/2023 08:16:46 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/class-bp-group-extension.php
r13195 r13436 8 8 */ 9 9 class BP_Tests_Group_Extension_TestCases extends BP_UnitTestCase { 10 protected $permalink_structure = ''; 11 12 public function set_up() { 13 parent::set_up(); 14 $this->permalink_structure = get_option( 'permalink_structure', '' ); 15 } 16 17 public function tear_down() { 18 parent::tear_down(); 19 $this->set_permalink_structure( $this->permalink_structure ); 20 } 21 10 22 public function test_parse_legacy_properties() { 11 23 $class_name = 'BPTest_Group_Extension_Parse_Legacy_Properties'; … … 222 234 public function test_enable_nav_item_true() { 223 235 $old_options_nav = buddypress()->bp_options_nav; 236 $this->set_permalink_structure( '/%postname%/' ); 224 237 225 238 $g = self::factory()->group->create(); … … 244 257 */ 245 258 public function test_enable_nav_item_false() { 259 $this->set_permalink_structure( '/%postname%/' ); 246 260 $old_options_nav = buddypress()->bp_options_nav; 247 261 … … 267 281 */ 268 282 public function test_visibility_private() { 283 $this->set_permalink_structure( '/%postname%/' ); 269 284 $old_options_nav = buddypress()->bp_options_nav; 270 285 $old_current_user = get_current_user_id(); … … 311 326 */ 312 327 public function test_visibility_public() { 328 $this->set_permalink_structure( '/%postname%/' ); 313 329 $old_options_nav = buddypress()->bp_options_nav; 314 330 $old_current_user = get_current_user_id(); … … 348 364 */ 349 365 public function test_user_can_visit_inferred_from_enable_nav_item() { 366 $this->set_permalink_structure( '/%postname%/' ); 350 367 $old_current_user = get_current_user_id(); 351 368 … … 373 390 */ 374 391 public function test_user_can_visit_explicit_for_logged_out_user() { 392 $this->set_permalink_structure( '/%postname%/' ); 375 393 $old_current_user = get_current_user_id(); 376 394 $this->set_current_user( 0 ); … … 413 431 */ 414 432 public function test_user_can_visit_explicit_for_logged_in_user() { 433 $this->set_permalink_structure( '/%postname%/' ); 415 434 $g = self::factory()->group->create( array( 416 435 'status' => 'public', … … 455 474 */ 456 475 public function test_user_can_visit_explicit_for_group_member() { 476 $this->set_permalink_structure( '/%postname%/' ); 457 477 $g = self::factory()->group->create( array( 458 478 'status' => 'public', … … 499 519 */ 500 520 public function test_user_can_visit_explicit_for_group_mod() { 521 $this->set_permalink_structure( '/%postname%/' ); 501 522 $g = self::factory()->group->create( array( 502 523 'status' => 'public', … … 545 566 */ 546 567 public function test_user_can_visit_explicit_for_group_admin() { 568 $this->set_permalink_structure( '/%postname%/' ); 547 569 $g = self::factory()->group->create( array( 548 570 'status' => 'public', … … 591 613 */ 592 614 public function test_user_can_see_nav_item_implied() { 615 $this->set_permalink_structure( '/%postname%/' ); 593 616 $g = self::factory()->group->create( array( 594 617 'status' => 'public', … … 632 655 */ 633 656 public function test_user_can_see_nav_item_explicit_for_logged_out_user() { 657 $this->set_permalink_structure( '/%postname%/' ); 634 658 $g = self::factory()->group->create( array( 635 659 'status' => 'public', … … 673 697 */ 674 698 public function test_user_can_see_nav_item_explicit_for_logged_in_user() { 699 $this->set_permalink_structure( '/%postname%/' ); 675 700 $g = self::factory()->group->create( array( 676 701 'status' => 'public', … … 715 740 */ 716 741 public function test_user_can_see_nav_item_explicit_for_group_member() { 742 $this->set_permalink_structure( '/%postname%/' ); 717 743 $g = self::factory()->group->create( array( 718 744 'status' => 'public', … … 759 785 */ 760 786 public function test_user_can_see_nav_item_explicit_for_group_mod() { 787 $this->set_permalink_structure( '/%postname%/' ); 761 788 $g = self::factory()->group->create( array( 762 789 'status' => 'public', … … 805 832 */ 806 833 public function test_user_can_see_nav_item_explicit_for_group_admin() { 834 $this->set_permalink_structure( '/%postname%/' ); 807 835 $g = self::factory()->group->create( array( 808 836 'status' => 'public', … … 851 879 */ 852 880 public function test_widget_on_group_home_page() { 881 $this->set_permalink_structure( '/%postname%/' ); 853 882 $g = self::factory()->group->create( array( 854 883 'status' => 'public', … … 872 901 */ 873 902 public function test_widget_on_group_members_page() { 903 $this->set_permalink_structure( '/%postname%/' ); 874 904 $g = self::factory()->group->create( array( 875 905 'status' => 'public', … … 893 923 */ 894 924 public function test_adding_multiple_extension_classes() { 925 $this->set_permalink_structure( '/%postname%/' ); 895 926 $old_options_nav = buddypress()->bp_options_nav; 896 927
Note: See TracChangeset
for help on using the changeset viewer.