- Timestamp:
- 03/07/2023 04:28:08 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/template/bpUserHasAccess.php
r11737 r13433 5 5 */ 6 6 class BP_Tests_Core_Template_BpUserHasAccess extends BP_UnitTestCase { 7 protected $permalink_structure = ''; 8 9 public function set_up() { 10 parent::set_up(); 11 $this->permalink_structure = get_option( 'permalink_structure', '' ); 12 } 13 14 public function tear_down() { 15 $this->set_permalink_structure( $this->permalink_structure ); 16 17 parent::tear_down(); 18 } 19 7 20 public function test_should_return_true_for_bp_moderate_user() { 8 21 $users = self::factory()->user->create_many( 2 ); … … 10 23 $this->grant_bp_moderate( $users[0] ); 11 24 $this->set_current_user( $users[0] ); 25 $this->set_permalink_structure( '/%postname%/' ); 12 26 13 $this->go_to( bp_ core_get_user_domain( $users[1] ) );27 $this->go_to( bp_members_get_user_url( $users[1] ) ); 14 28 15 29 $this->assertTrue( bp_user_has_access( $users[0] ) ); … … 20 34 21 35 $this->set_current_user( $users[0] ); 36 $this->set_permalink_structure( '/%postname%/' ); 22 37 23 $this->go_to( bp_ core_get_user_domain( $users[1] ) );38 $this->go_to( bp_members_get_user_url( $users[1] ) ); 24 39 25 40 $this->assertFalse( bp_user_has_access( $users[0] ) ); … … 30 45 31 46 $this->set_current_user( $users[0] ); 47 $this->set_permalink_structure( '/%postname%/' ); 32 48 33 $this->go_to( bp_ core_get_user_domain( $users[0] ) );49 $this->go_to( bp_members_get_user_url( $users[0] ) ); 34 50 35 51 $this->assertTrue( bp_user_has_access( $users[0] ) );
Note: See TracChangeset
for help on using the changeset viewer.