Skip to content

Commit d62baff

Browse files
committed
Tests: Keep the test taxonomy available during term-parent fixture deletion.
`Tests_Terms_GetTermsParentsList` unregistered `wptests_tax` after each test, so the class teardown's `wp_delete_term()` calls ran after the taxonomy was gone and returned `false`. Remove the per-test unregister. The class teardown still unregisters the taxonomy after deleting both terms. Follow-up to [65014]. Developed in: #15193 Props peterwilsoncc. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@65288 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 83e5061 commit d62baff

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎tests/phpunit/tests/term/getTermParentsList.php‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ public function set_up() {
3030
register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true ) );
3131
}
3232

33-
public function tear_down() {
34-
unregister_taxonomy( 'wptests_tax' );
35-
parent::tear_down();
36-
}
37-
3833
public function test_should_return_wp_error_for_empty_id() {
3934
$this->assertWPError( get_term_parents_list( '', 'wptests_tax' ) );
4035
}

0 commit comments

Comments
 (0)