- Timestamp:
- 06/10/2016 02:53:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/nav/bpCoreRemoveSubnavItem.php
r10745 r10876 71 71 $bp->bp_options_nav = $_bp_options_nav; 72 72 } 73 74 public function test_backcompat_remove_group_nav_items() { 75 $g1 = $this->factory->group->create(); 76 77 // In group context 78 $g_obj = groups_get_group( array( 'group_id' => $g1 ) ); 79 $this->go_to( bp_get_group_permalink( $g_obj ) ); 80 81 bp_core_new_subnav_item( array( 82 'name' => 'Clam', 83 'slug' => 'clam', 84 'parent_slug' => bp_get_current_group_slug(), 85 'parent_url' => bp_get_group_permalink( $g_obj ), 86 'screen_function' => 'clam_subnav', 87 ) ); 88 89 bp_core_remove_subnav_item( $g_obj->slug, 'clam' ); 90 91 $nav = bp_get_nav_menu_items( 'groups' ); 92 $found = false; 93 foreach ( $nav as $_nav ) { 94 if ( 'clam' === $_nav->css_id ) { 95 $found = true; 96 break; 97 } 98 } 99 100 $this->assertFalse( $found ); 101 } 73 102 }
Note: See TracChangeset
for help on using the changeset viewer.