From 8ec81ace60dd3571161b503c458ba6d366da3524 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 7 Sep 2022 14:05:41 +0000 Subject: [PATCH] Tests: Remove redundant `function_exists()` check in a `term_is_ancestor_of()` test. The function is available as of WordPress 3.4. Follow-up to [19678], [493/tests]. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54091 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/term.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/term.php b/tests/phpunit/tests/term.php index 15783c58f2..3e9c0a25f5 100644 --- a/tests/phpunit/tests/term.php +++ b/tests/phpunit/tests/term.php @@ -138,10 +138,10 @@ class Tests_Term extends WP_UnitTestCase { $this->assertIsArray( $t ); $t2 = wp_insert_term( $term, 'category', array( 'parent' => $t['term_id'] ) ); $this->assertIsArray( $t2 ); - if ( function_exists( 'term_is_ancestor_of' ) ) { - $this->assertTrue( term_is_ancestor_of( $t['term_id'], $t2['term_id'], 'category' ) ); - $this->assertFalse( term_is_ancestor_of( $t2['term_id'], $t['term_id'], 'category' ) ); - } + + $this->assertTrue( term_is_ancestor_of( $t['term_id'], $t2['term_id'], 'category' ) ); + $this->assertFalse( term_is_ancestor_of( $t2['term_id'], $t['term_id'], 'category' ) ); + $this->assertTrue( cat_is_ancestor_of( $t['term_id'], $t2['term_id'] ) ); $this->assertFalse( cat_is_ancestor_of( $t2['term_id'], $t['term_id'] ) );