Changeset 30265 for trunk/tests/phpunit/tests/term/getTerms.php
- Timestamp:
- 11/06/2014 09:46:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerms.php
r30113 r30265 172 172 get_terms( 'post_tag', array( 'include' => array( 'unexpected-string' ), 'hide_empty' => false ) ); 173 173 $this->assertEmpty( $wpdb->last_error ); 174 } 175 176 /** 177 * @ticket 30275 178 */ 179 public function test_exclude_with_hierarchical_true_for_non_hierarchical_taxonomy() { 180 register_taxonomy( 'wptests_tax', 'post' ); 181 182 $terms = $this->factory->term->create_many( 2, array( 183 'taxonomy' => 'wptests_tax', 184 ) ); 185 186 $found = get_terms( 'wptests_tax', array( 187 'taxonomy' => 'wptests_tax', 188 'hide_empty' => false, 189 'exclude_tree' => array( $terms[0] ), 190 'hierarchical' => true, 191 ) ); 192 193 $this->assertEquals( array( $terms[1] ), wp_list_pluck( $found, 'term_id' ) ); 194 195 _unregister_taxonomy( 'wptests_tax' ); 174 196 } 175 197
Note: See TracChangeset
for help on using the changeset viewer.