Make WordPress Core


Ignore:
Timestamp:
03/19/2023 12:51:14 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Tests: Improve documentation and variable names in some formatting tests.

Includes documenting data provider values using hash notation in the tests for:

  • convert_smilies()
  • get_url_in_content()
  • links_add_target()
  • normalize_whitespace()

Follow-up to [26191], [26327], [26328], [26972], [55562].

See #57841.

File:
1 edited

Legend:

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

    r55562 r55563  
    99
    1010    /**
    11      * Validate the get_url_in_content function
     11     * Tests the get_url_in_content() function.
    1212     *
    1313     * @dataProvider data_get_url_in_content
    1414     */
    15     public function test_get_url_in_content( $in_str, $exp_str ) {
    16         $this->assertSame( $exp_str, get_url_in_content( $in_str ) );
     15    public function test_get_url_in_content( $input, $expected ) {
     16        $this->assertSame( $expected, get_url_in_content( $input ) );
    1717    }
    1818
    1919    /**
    20      * URL Content Data Provider
     20     * Data provider.
    2121     *
    22      * array ( input_txt, converted_output_txt )
     22     * @return array {
     23     *     @type array {
     24     *         @type string $input    Input content.
     25     *         @type string $expected Expected output.
     26     *     }
     27     * }
    2328     */
    2429    public function data_get_url_in_content() {
Note: See TracChangeset for help on using the changeset viewer.