Changeset 13437 for trunk/tests/phpunit/testcases/core/nav/bpCoreMaybeHookNewSubnavScreenFunction.php
- Timestamp:
- 03/18/2023 09:42:31 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/nav/bpCoreMaybeHookNewSubnavScreenFunction.php
r13436 r13437 171 171 $old_current_user = get_current_user_id(); 172 172 $this->set_current_user( $u ); 173 $this->set_permalink_structure( '/%postname%/' ); 173 174 174 175 $group = groups_get_group( $g ); 175 176 176 $this->go_to( bp_get_group_ permalink( $group ) );177 178 $subnav_item = array( 179 'user_has_access' => false, 180 'no_access_url' => bp_get_group_ permalink( $group ),181 ); 182 183 // Just test relevant info 184 $found = bp_core_maybe_hook_new_subnav_screen_function( $subnav_item ); 185 $this->assertSame( 'failure', $found['status'] ); 186 $this->assertSame( bp_get_group_ permalink( $group ), $found['redirect_args']['root'] );177 $this->go_to( bp_get_group_url( $group ) ); 178 179 $subnav_item = array( 180 'user_has_access' => false, 181 'no_access_url' => bp_get_group_url( $group ), 182 ); 183 184 // Just test relevant info 185 $found = bp_core_maybe_hook_new_subnav_screen_function( $subnav_item ); 186 $this->assertSame( 'failure', $found['status'] ); 187 $this->assertSame( bp_get_group_url( $group ), $found['redirect_args']['root'] ); 187 188 188 189 // Clean up … … 198 199 $group = groups_get_group( $g ); 199 200 200 $this->go_to( bp_get_group_ permalink( $group ) );201 $this->go_to( bp_get_group_url( $group ) ); 201 202 202 203 $subnav_item = array(
Note: See TracChangeset
for help on using the changeset viewer.