Changeset 52389 for trunk/tests/phpunit/tests/term.php
- Timestamp:
- 12/19/2021 01:42:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term.php
r52010 r52389 52 52 public function test_is_term_type() { 53 53 // Insert a term. 54 $term = rand_str();54 $term = 'term_new'; 55 55 $t = wp_insert_term( $term, $this->taxonomy ); 56 56 $this->assertIsArray( $t ); 57 57 $term_obj = get_term_by( 'name', $term, $this->taxonomy ); 58 $this->assertEquals( $t['term_id'], term_exists( $term_obj->slug ) ); 59 58 59 $exists = term_exists( $term_obj->slug ); 60 60 // Clean up. 61 $this->assertTrue( wp_delete_term( $t['term_id'], $this->taxonomy ) ); 61 $deleted = wp_delete_term( $t['term_id'], $this->taxonomy ); 62 63 $this->assertEquals( $t['term_id'], $exists ); 64 $this->assertTrue( $deleted ); 62 65 } 63 66
Note: See TracChangeset
for help on using the changeset viewer.