Make WordPress Core


Ignore:
Timestamp:
07/24/2024 09:40:59 PM (7 months ago)
Author:
flixos90
Message:

Taxonomy: Ensure get_edit_term_link() produces the correct result when called without taxonomy.

This fixes an oversight missed in [36646].

Props debarghyabanerjee.
Fixes #61726.
See #35922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link/getEditTermLink.php

    r56559 r58807  
    237237        );
    238238    }
     239
     240    /**
     241     * Checks that `get_edit_term_link()` produces the correct URL when called without taxonomy.
     242     *
     243     * @ticket 61726
     244     */
     245    public function test_get_edit_term_link_without_taxonomy() {
     246        $term = $this->get_term( 'wptests_tax', true );
     247
     248        $actual   = get_edit_term_link( $term );
     249        $expected = sprintf( admin_url( 'term.php?taxonomy=wptests_tax&tag_ID=%d&post_type=post' ), $term );
     250        $this->assertSame( $expected, $actual );
     251    }
    239252}
Note: See TracChangeset for help on using the changeset viewer.