Make WordPress Core


Ignore:
Timestamp:
10/03/2024 11:42:43 PM (16 months ago)
Author:
SergeyBiryukov
Message:

Tests: Bring some consistency to links_add_base_url() and links_add_target() tests.

Includes:

  • Correcting the test class name as per the naming conventions.
  • Documenting data provider values using hash notation.
  • Passing the $attrs parameter to the function if not null.

Follow-up to [26328], [55563], [59162].

See #61530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/linksAddTarget.php

    r55563 r59163  
    11<?php
    22/**
     3 * Tests for the links_add_target() function.
     4 *
    35 * @group formatting
    46 *
     
    810
    911    /**
    10      * Tests the links_add_target() function.
     12     * @ticket 26164
    1113     *
    1214     * @dataProvider data_links_add_target
     
    2729     * @return array {
    2830     *     @type array {
    29      *         @type string $content  String to search for links in.
    30      *         @type string $target   The target to add to the links.
    31      *         @type string $tags     An array of tags to apply to.
    32      *         @type string $expected Expected output.
     31     *         @type string     $content  String to search for links in.
     32     *         @type string     $target   The target to add to the links.
     33     *         @type array|null $tags     An array of tags to apply to.
     34     *         @type string     $expected Expected output.
    3335     *     }
    3436     * }
Note: See TracChangeset for help on using the changeset viewer.