Changeset 47122 for trunk/tests/phpunit/tests/term.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term.php
r46586 r47122 51 51 */ 52 52 function test_is_term_type() { 53 // insert a term53 // Insert a term. 54 54 $term = rand_str(); 55 55 $t = wp_insert_term( $term, $this->taxonomy ); … … 58 58 $this->assertEquals( $t['term_id'], term_exists( $term_obj->slug ) ); 59 59 60 // clean up60 // Clean up. 61 61 $this->assertTrue( wp_delete_term( $t['term_id'], $this->taxonomy ) ); 62 62 } … … 67 67 function test_wp_count_terms() { 68 68 $count = wp_count_terms( 'category', array( 'hide_empty' => true ) ); 69 // there are 5 posts, all Uncategorized69 // There are 5 posts, all Uncategorized. 70 70 $this->assertEquals( 1, $count ); 71 71 } … … 136 136 $this->assertEquals( $initial_count + 1, wp_count_terms( 'category' ) ); 137 137 138 // make sure the term exists138 // Make sure the term exists. 139 139 $this->assertTrue( term_exists( $term ) > 0 ); 140 140 $this->assertTrue( term_exists( $t ) > 0 ); 141 141 142 // now delete it142 // Now delete it. 143 143 $this->assertTrue( wp_delete_category( $t ) ); 144 144 $this->assertNull( term_exists( $term ) );
Note: See TracChangeset
for help on using the changeset viewer.