WordPress.org

Make WordPress Core

Changeset 1030 in tests


Ignore:
Timestamp:
09/20/2012 10:20:07 PM (6 years ago)
Author:
scribu
Message:

test the names of the updated term, not the term ids. see #125

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/term.php

    r1029 r1030  
    322322
    323323        $term_2 = rand_str();
    324         $new_term = wp_update_term( $t2['term_id'], 'post_tag', array( 'name' => $term_2 ) );
    325 
    326         $this->assertNotEquals( $t1['term_id'], $new_term['term_id'] );
     324        $t2_updated = wp_update_term( $t2['term_id'], 'post_tag', array( 'name' => $term_2 ) );
     325
     326        $this->assertEquals( $term_1, get_term_field( 'name', $t1['term_id'], 'category' ) );
     327        $this->assertEquals( $term_2, get_term_field( 'name', $t2_updated['term_id'], 'post_tag' ) );
    327328    }
    328329}
Note: See TracChangeset for help on using the changeset viewer.