Changeset 36567
- Timestamp:
- 02/17/2016 11:01:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/meta.php
r36566 r36567 151 151 } 152 152 153 public function test_adding_term_meta_should_bust_get_terms_cache() { 154 $terms = self::factory()->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) ); 155 156 add_term_meta( $terms[0], 'foo', 'bar' ); 157 158 // Prime cache. 159 $found = get_terms( 'wptests_tax', array( 160 'hide_empty' => false, 161 'fields' => 'ids', 162 'meta_query' => array( 163 array( 164 'key' => 'foo', 165 'value' => 'bar', 166 ), 167 ), 168 ) ); 169 170 $this->assertEqualSets( array( $terms[0] ), $found ); 171 172 add_term_meta( $terms[1], 'foo', 'bar' ); 173 174 $found = get_terms( 'wptests_tax', array( 175 'hide_empty' => false, 176 'fields' => 'ids', 177 'meta_query' => array( 178 array( 179 'key' => 'foo', 180 'value' => 'bar', 181 ), 182 ), 183 ) ); 184 185 $this->assertEqualSets( array( $terms[0], $terms[1] ), $found ); 186 } 187 153 188 public function test_updating_term_meta_should_bust_get_terms_cache() { 154 189 $terms = self::factory()->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) );
Note: See TracChangeset
for help on using the changeset viewer.