- Timestamp:
- 03/07/2023 04:28:08 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/nav/bpCoreNewNavItem.php
r11737 r13433 5 5 */ 6 6 class BP_Tests_Core_Nav_BpCoreNewNavItem 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 } 7 19 8 20 /** … … 15 27 $old_current_user = get_current_user_id(); 16 28 $this->set_current_user( $u ); 17 18 $this->go_to( bp_core_get_user_domain( $u ) ); 29 $this->set_permalink_structure( '/%postname%/' ); 30 31 $this->go_to( bp_members_get_user_url( $u ) ); 19 32 20 33 bp_core_new_nav_item( array( … … 29 42 'name' => 'Foo', 30 43 'slug' => 'foo', 31 'link' => trailingslashit( bp_core_get_user_domain( $u ) . 'foo' ), 44 'link' => bp_members_get_user_url( 45 $u, 46 array( 47 'single_item_component' => 'foo', 48 ) 49 ), 32 50 'css_id' => 'foo', 33 51 'show_for_displayed_user' => true, … … 147 165 $old_current_user = get_current_user_id(); 148 166 $this->set_current_user( $u2 ); 149 150 $this->go_to( bp_core_get_user_domain( $u ) ); 167 $this->set_permalink_structure( '/%postname%/' ); 168 169 $this->go_to( bp_members_get_user_url( $u ) ); 151 170 152 171 $expected = array( … … 182 201 $old_current_user = get_current_user_id(); 183 202 $this->set_current_user( $u2 ); 184 185 $this->go_to( bp_core_get_user_domain( $u ) ); 203 $this->set_permalink_structure( '/%postname%/' ); 204 205 $this->go_to( bp_members_get_user_url( $u ) ); 186 206 187 207 bp_core_new_nav_item( array(
Note: See TracChangeset
for help on using the changeset viewer.