Changeset 36003 for trunk/tests/phpunit/tests/term/getTerms.php
- Timestamp:
- 12/18/2015 05:43:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerms.php
r35242 r36003 1572 1572 1573 1573 /** 1574 * @ticket 35137 1575 */ 1576 public function test_meta_query_should_not_return_duplicates() { 1577 register_taxonomy( 'wptests_tax', 'post' ); 1578 $terms = self::factory()->term->create_many( 1, array( 'taxonomy' => 'wptests_tax' ) ); 1579 add_term_meta( $terms[0], 'foo', 'bar' ); 1580 add_term_meta( $terms[0], 'foo', 'ber' ); 1581 1582 $found = get_terms( 'wptests_tax', array( 1583 'hide_empty' => false, 1584 'meta_query' => array( 1585 array( 1586 'key' => 'foo', 1587 'value' => 'bur', 1588 'compare' => '!=', 1589 ), 1590 ), 1591 'fields' => 'ids', 1592 ) ); 1593 1594 $this->assertEqualSets( array( $terms[0] ), $found ); 1595 } 1596 1597 /** 1574 1598 * @ticket 14162 1575 1599 */
Note: See TracChangeset
for help on using the changeset viewer.