- Timestamp:
- 05/12/2016 05:19:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/nav/bpCoreRemoveSubnavItem.php
r10744 r10745 6 6 */ 7 7 class BP_Tests_Core_Nav_BpCoreRemoveSubnavItem extends BP_UnitTestCase { 8 /** 9 * @expectedIncorrectUsage bp_nav 10 */ 8 11 public function test_should_remove_subnav_item() { 9 12 $bp = buddypress(); … … 36 39 } 37 40 41 /** 42 * @expectedIncorrectUsage bp_nav 43 */ 38 44 public function test_should_fail_on_incorrect_parent() { 39 45 $bp = buddypress(); … … 65 71 $bp->bp_options_nav = $_bp_options_nav; 66 72 } 67 68 public function test_should_remove_parent_array_if_left_childless() {69 $bp = buddypress();70 71 $_bp_nav = $bp->bp_nav;72 $_bp_options_nav = $bp->bp_options_nav;73 74 bp_core_new_nav_item( array(75 'name' => 'Foo',76 'slug' => 'foo',77 'screen_function' => 'foo',78 ) );79 80 bp_core_new_subnav_item( array(81 'name' => 'Bar',82 'slug' => 'bar',83 'parent_slug' => 'foo',84 'parent_url' => 'foo',85 'screen_function' => 'bar',86 ) );87 88 $this->assertTrue( isset( $bp->bp_options_nav['foo']['bar'] ) );89 90 bp_core_remove_subnav_item( 'foo', 'bar' );91 92 $this->assertFalse( isset( $bp->bp_options_nav['foo'] ) );93 94 $bp->bp_nav = $_bp_nav;95 $bp->bp_options_nav = $_bp_options_nav;96 }97 73 }
Note: See TracChangeset
for help on using the changeset viewer.