Changeset 31532 for trunk/tests/phpunit/tests/term/getTerms.php
- Timestamp:
- 02/24/2015 04:36:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerms.php
r31285 r31532 1136 1136 } 1137 1137 1138 /** 1139 * @ticket 31364 1140 */ 1141 public function test_orderby_description() { 1142 $tax = 'wptests_tax'; 1143 register_taxonomy( $tax, 'post' ); 1144 1145 $t1 = $this->factory->term->create( array( 'taxonomy' => $tax, 'description' => 'fff' ) ); 1146 $t2 = $this->factory->term->create( array( 'taxonomy' => $tax, 'description' => 'aaa' ) ); 1147 $t3 = $this->factory->term->create( array( 'taxonomy' => $tax, 'description' => 'zzz' ) ); 1148 $t4 = $this->factory->term->create( array( 'taxonomy' => $tax, 'description' => 'jjj' ) ); 1149 1150 $found = get_terms( $tax, array( 1151 'fields' => 'ids', 1152 'orderby' => 'description', 1153 'hide_empty' => false, 1154 ) ); 1155 1156 _unregister_taxonomy( 'wptests_tax' ); 1157 1158 $this->assertEquals( array( $t2, $t1, $t4, $t3 ), $found ); 1159 } 1160 1138 1161 public function test_hierarchical_false_with_parent() { 1139 1162 $initial_terms = $this->create_hierarchical_terms();
Note: See TracChangeset
for help on using the changeset viewer.