WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/21/2017 03:56:25 AM (2 years ago)
Author:
boonebgorges
Message:

Use WP_Term_Query when transforming tax queries.

This change allows tax query transformations to be cached.

Props spacedmonkey.
Fixes #37038.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/taxQuery.php

    r39174 r40918  
    164164        $tq->transform_query( $tq->queries[0], 'term_taxonomy_id' );
    165165
    166         $this->assertSame( $tt_ids, $tq->queries[0]['terms'] );
     166        $this->assertEqualSets( $tt_ids, $tq->queries[0]['terms'] );
    167167        $this->assertSame( 'term_taxonomy_id', $tq->queries[0]['field'] );
    168168    }
     
    182182        $tq->transform_query( $tq->queries[0], 'term_taxonomy_id' );
    183183
    184         $this->assertSame( $tt_ids, $tq->queries[0]['terms'] );
     184        $this->assertEqualSets( $tt_ids, $tq->queries[0]['terms'] );
    185185        $this->assertSame( 'term_taxonomy_id', $tq->queries[0]['field'] );
    186186    }
Note: See TracChangeset for help on using the changeset viewer.