- Timestamp:
- 05/02/2020 10:34:50 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php
r47200 r47747 121 121 $this->assertCount( 1, $results ); 122 122 } 123 124 /** 125 * Test that search displays terms that are not assigned to any posts. 126 * 127 * @ticket 45298 128 */ 129 public function test_search_should_return_unassigned_term_items() { 130 register_taxonomy( 'wptests_tax', 'post' ); 131 132 $this->factory->term->create( 133 array( 134 'taxonomy' => 'wptests_tax', 135 'name' => 'foobar', 136 ) 137 ); 138 139 $request = array( 140 'type' => 'quick-search-taxonomy-wptests_tax', 141 'q' => 'foobar', 142 ); 143 $output = get_echo( '_wp_ajax_menu_quick_search', array( $request ) ); 144 145 $this->assertNotEmpty( $output ); 146 $results = explode( "\n", trim( $output ) ); 147 $this->assertCount( 1, $results ); 148 } 123 149 }
Note: See TracChangeset
for help on using the changeset viewer.