Make WordPress Core

Changeset 37649


Ignore:
Timestamp:
06/06/2016 11:42:43 PM (8 years ago)
Author:
boonebgorges
Message:

Tests: Compare wp_set_object_terms() results using term_taxonomy_id.

term_id and term_taxonomy_id become offset when running the entire test
suite.

Introduced in [37647].

See #37009.

File:
1 edited

Legend:

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

    r37647 r37649  
    319319
    320320        $this->assertNotEmpty( $tt_ids );
    321         $term = get_term( $tt_ids[0] );
     321        $term = get_term_by( 'term_taxonomy_id', $tt_ids[0] );
    322322        $this->assertInstanceOf( 'WP_Term', $term );
    323323        $this->assertSame( 'foo', $term->slug );
     
    336336
    337337        $this->assertNotEmpty( $tt_ids );
    338         $term = get_term( $tt_ids[0] );
     338        $term = get_term_by( 'term_taxonomy_id', $tt_ids[0] );
    339339        $this->assertInstanceOf( 'WP_Term', $term );
    340340        $this->assertSame( $t, $term->term_id );
     
    353353
    354354        $this->assertNotEmpty( $tt_ids );
    355         $term = get_term( $tt_ids[0] );
     355        $term = get_term_by( 'term_taxonomy_id', $tt_ids[0] );
    356356        $this->assertInstanceOf( 'WP_Term', $term );
    357357        $this->assertSame( $t, $term->term_id );
     
    376376
    377377        $this->assertNotEmpty( $tt_ids );
    378         $term = get_term( $tt_ids[0] );
     378        $term = get_term_by( 'term_taxonomy_id', $tt_ids[0] );
    379379        $this->assertInstanceOf( 'WP_Term', $term );
    380380        $this->assertSame( $t2, $term->term_id );
Note: See TracChangeset for help on using the changeset viewer.