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/urlencodeDeep.php

    r55562 r55563  
    1010
    1111    /**
    12      * Data Provider
     12     * Tests the urlencode_deep() function pair by pair.
     13     *
     14     * @dataProvider data_urlencode_deep
     15     *
     16     * @param string $input
     17     * @param string $expected
     18     */
     19    public function test_urlencode_deep_should_encode_individual_value( $input, $expected ) {
     20        $this->assertSame( $expected, urlencode_deep( $input ) );
     21    }
     22
     23    /**
     24     * Data provider.
    1325     */
    1426    public function data_urlencode_deep() {
     
    2335
    2436    /**
    25      * Validate the urlencode_deep function pair by pair
    26      *
    27      * @dataProvider data_urlencode_deep
    28      *
    29      * @param string $actual
    30      * @param string $expected
    31      */
    32     public function test_urlencode_deep_should_encode_individual_value( $actual, $expected ) {
    33         $this->assertSame( $expected, urlencode_deep( $actual ) );
    34     }
    35 
    36     /**
    37      * Test the whole array as input
     37     * Tests the whole array as input.
    3838     */
    3939    public function test_urlencode_deep_should_encode_all_values_in_array() {
Note: See TracChangeset for help on using the changeset viewer.