Make WordPress Core


Ignore:
Timestamp:
09/07/2022 02:05:41 PM (23 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term.php

    r52938 r54091  
    139139        $t2 = wp_insert_term( $term, 'category', array( 'parent' => $t['term_id'] ) );
    140140        $this->assertIsArray( $t2 );
    141         if ( function_exists( 'term_is_ancestor_of' ) ) {
    142             $this->assertTrue( term_is_ancestor_of( $t['term_id'], $t2['term_id'], 'category' ) );
    143             $this->assertFalse( term_is_ancestor_of( $t2['term_id'], $t['term_id'], 'category' ) );
    144         }
     141
     142        $this->assertTrue( term_is_ancestor_of( $t['term_id'], $t2['term_id'], 'category' ) );
     143        $this->assertFalse( term_is_ancestor_of( $t2['term_id'], $t['term_id'], 'category' ) );
     144
    145145        $this->assertTrue( cat_is_ancestor_of( $t['term_id'], $t2['term_id'] ) );
    146146        $this->assertFalse( cat_is_ancestor_of( $t2['term_id'], $t['term_id'] ) );
Note: See TracChangeset for help on using the changeset viewer.