Changeset 34679 for trunk/tests/phpunit/tests/term/getTermBy.php
- Timestamp:
- 09/29/2015 03:51:11 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/term/getTermBy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTermBy.php
r34628 r34679 37 37 $this->assertSame( $t, $found->term_id ); 38 38 } 39 40 /** 41 * @ticket 30620 42 */ 43 public function test_taxonomy_should_be_ignored_if_matching_by_term_taxonomy_id() { 44 global $wpdb; 45 46 register_taxonomy( 'wptests_tax', 'post' ); 47 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 48 $term = get_term( $t, 'wptests_tax' ); 49 50 $new_ttid = $term->term_taxonomy_id + 1; 51 52 // Offset just to be sure. 53 $wpdb->update( 54 $wpdb->term_taxonomy, 55 array( 'term_taxonomy_id' => $new_ttid ), 56 array( 'term_id' => $t ) 57 ); 58 59 $found = get_term_by( 'term_taxonomy_id', $new_ttid, 'foo' ); 60 $this->assertSame( $t, $found->term_id ); 61 } 39 62 }
Note: See TracChangeset
for help on using the changeset viewer.