Changeset 32294 for trunk/tests/phpunit/tests/post/nav-menu.php
- Timestamp:
- 04/24/2015 06:57:07 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/nav-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/nav-menu.php
r29792 r32294 118 118 } 119 119 120 public function test_wp_get_nav_menu_items_with_taxonomy_term() { 121 register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true ) ); 122 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 123 $child_terms = $this->factory->term->create_many( 2, array( 'taxonomy' => 'wptests_tax', 'parent' => $t ) ); 124 125 $term_menu_item = wp_update_nav_menu_item( $this->menu_id, 0, array( 126 'menu-item-type' => 'taxonomy', 127 'menu-item-object' => 'wptests_tax', 128 'menu-item-object-id' => $t, 129 'menu-item-status' => 'publish' 130 ) ); 131 132 $term = get_term( $t, 'wptests_tax' ); 133 134 $menu_items = wp_get_nav_menu_items( $this->menu_id ); 135 $this->assertSame( $term->name, $menu_items[0]->title ); 136 $this->assertEquals( $t, $menu_items[0]->object_id ); 137 } 138 120 139 /** 121 140 * @ticket 29460
Note: See TracChangeset
for help on using the changeset viewer.