Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/phpunit/tests/term/wpSetObjectTerms.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
self::$term_ids = $factory->term->create_many( 5, array( 'taxonomy' => self::$taxonomy ) );
}

public function tear_down() {
unregister_taxonomy( 'wptests_tax' );

parent::tear_down();
}

/**
* @ticket 26570
*/
Expand Down Expand Up @@ -101,6 +107,9 @@ public function test_set_object_terms() {

wp_set_object_terms( $post_id, array( $cat1->slug, $cat2->slug, $cat3->slug ), $hier );
$this->assertTrue( has_term( array( $cat1->slug, $cat2->slug, $cat3->slug ), $hier, $post_id ) );

unregister_taxonomy( $non_hier );
unregister_taxonomy( $hier );
}

public function test_set_object_terms_by_id() {
Expand Down
Loading