Make WordPress Core

Changeset 60112


Ignore:
Timestamp:
03/31/2025 09:21:05 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Merge file-level and class-level DocBlocks in wp_get_canonical_url() test file.

Per the documentation standards, whenever possible, all WordPress files should contain a header DocBlock, regardless of the file’s contents – this includes files containing classes.

However, this recommendation makes less sense for unit test classes if not applied consistently, and the duplicate tags cause some confusion.

This commit aims to reduce confusion and avoid repeating information by combining the DocBlocks.

Includes using third-person singular verbs in test method descriptions, as per the documentation standards.

Follow-up to [55337], [60108], [60109].

See #63166.

File:
1 edited

Legend:

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

    r60109 r60112  
    22/**
    33 * Tests for the wp_get_canonical_url() function.
    4  *
    5  * @package WordPress
    6  * @subpackage Link
    7  */
    8 
    9 /**
    10  * Class for Testing the wp_get_canonical_url() function.
    114 *
    125 * @group link
     
    158 */
    169class Tests_Link_WpGetCanonicalUrl extends WP_UnitTestCase {
     10
    1711    /**
    1812     * The ID of the post.
     
    5246
    5347    /**
    54      * Test for a non existing post.
     48     * Tests that false is returned for a non-existing post.
    5549     */
    5650    public function test_non_existing_post() {
     
    5953
    6054    /**
    61      * Test for a post that is not published.
     55     * Tests that false is returned for a post that is not published.
    6256     */
    6357    public function test_post_status() {
     
    7266
    7367    /**
    74      * Test for a page that is not the queried object.
     68     * Tests canonical URL for a page that is not the queried object.
    7569     */
    7670    public function test_non_current_page() {
     
    7973
    8074    /**
    81      * Test non permalink structure page usage.
     75     * Tests non-permalink structure page usage.
    8276     */
    8377    public function test_paged_with_plain_permalink_structure() {
     
    10397
    10498    /**
    105      * Test permalink structure page usage.
     99     * Tests permalink structure page usage.
    106100     */
    107101    public function test_paged_with_custom_permalink_structure() {
     
    125119
    126120    /**
    127      *  Test non permalink structure comment page usage.
     121     * Tests non-permalink structure comment page usage.
    128122     */
    129123    public function test_comments_paged_with_plain_permalink_structure() {
     
    151145
    152146    /**
    153      * Test permalink structure comment page usage.
     147     * Tests permalink structure comment page usage.
    154148     */
    155149    public function test_comments_paged_with_pretty_permalink_structure() {
     
    175169
    176170    /**
    177      * This test ensures that attachments with 'inherit' status properly receive a canonical URL.
     171     * Tests that attachments with 'inherit' status properly receive a canonical URL.
    178172     *
    179173     * @ticket 63041
     
    188182
    189183    /**
    190      * Test calling of filter.
     184     * Tests calling of filter.
    191185     */
    192186    public function test_get_canonical_url_filter() {
Note: See TracChangeset for help on using the changeset viewer.