Changeset 42343 for trunk/tests/phpunit/tests/term/getTerm.php
- Timestamp:
- 11/30/2017 11:09:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerm.php
r42228 r42343 24 24 25 25 // Manually modify because shared terms shouldn't naturally occur. 26 $wpdb->update( $wpdb->term_taxonomy, 26 $wpdb->update( 27 $wpdb->term_taxonomy, 27 28 array( 'term_id' => $t1['term_id'] ), 28 29 array( 'term_taxonomy_id' => $t2['term_taxonomy_id'] ), … … 33 34 return array( 34 35 array( 35 'term_id' => $t1['term_id'],36 'old_term_id' => $t1['term_id'],36 'term_id' => $t1['term_id'], 37 'old_term_id' => $t1['term_id'], 37 38 'term_taxonomy_id' => $t1['term_taxonomy_id'], 38 39 ), 39 40 array( 40 'term_id' => $t1['term_id'],41 'old_term_id' => $t2['term_id'],41 'term_id' => $t1['term_id'], 42 'old_term_id' => $t2['term_id'], 42 43 'term_taxonomy_id' => $t2['term_taxonomy_id'], 43 44 ), … … 86 87 87 88 // Prime cache. 88 $term_a = get_term( $t, 'wptests_tax' );89 $term_a = get_term( $t, 'wptests_tax' ); 89 90 $num_queries = $wpdb->num_queries; 90 91 … … 101 102 102 103 public function test_output_array_a() { 103 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );104 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 104 105 $term = get_term( $t, 'wptests_tax', ARRAY_A ); 105 106 $this->assertInternalType( 'array', $term ); … … 108 109 109 110 public function test_output_array_n() { 110 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) );111 $t = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 111 112 $term = get_term( $t, 'wptests_tax', ARRAY_N ); 112 113 $this->assertInternalType( 'array', $term );
Note: See TracChangeset
for help on using the changeset viewer.