Make WordPress Core


Ignore:
Timestamp:
03/19/2023 12:51:14 PM (19 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/normalizeWhitespace.php

    r55562 r55563  
    88
    99    /**
    10      * Validate the normalize_whitespace function
     10     * Tests the the normalize_whitespace() function.
    1111     *
    1212     * @dataProvider data_normalize_whitespace
    1313     */
    14     public function test_normalize_whitespace( $in_str, $exp_str ) {
    15         $this->assertSame( $exp_str, normalize_whitespace( $in_str ) );
     14    public function test_normalize_whitespace( $input, $expected ) {
     15        $this->assertSame( $expected, normalize_whitespace( $input ) );
    1616    }
    1717
    1818    /**
    19      * WhitespaceTest Content DataProvider
     19     * Data provider.
    2020     *
    21      * array( input_txt, converted_output_txt)
     21     * @return array {
     22     *     @type array {
     23     *         @type string $input    Input content.
     24     *         @type string $expected Expected output.
     25     *     }
     26     * }
    2227     */
    2328    public function data_normalize_whitespace() {
Note: See TracChangeset for help on using the changeset viewer.