WordPress.org

Make WordPress Core

Changeset 48442


Ignore:
Timestamp:
07/11/2020 10:50:36 PM (17 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct comments in tests/formatting/WPSlash.php per the documentation standards.

See #49572.

File:
1 edited

Legend:

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

    r48433 r48442  
    77
    88    /**
     9     * @ticket 42195
     10     *
    911     * @dataProvider data_wp_slash
    10      *
    11      * @ticket 42195
    1212     *
    1313     * @param string $value
    1414     * @param string $expected
    1515     */
    16     public function test_wp_slash_with( $value, $expected ) {
     16    public function test_wp_slash( $value, $expected ) {
    1717        $this->assertSame( $expected, wp_slash( $value ) );
    1818    }
     
    6060        $this->assertEquals( $new, wp_slash( $old ) );
    6161        $this->assertEquals( "I can\\\\\'t see, isn\\\\\'t that it?", wp_slash( $new ) );
    62         $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array
    63         $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed
     62        $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array.
     63        $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed.
    6464    }
    6565
     
    7979            'd' => 'foo',
    8080        );
    81         $arr['e'] = $arr; // Add a sub-array
    82         $this->assertEquals( $arr, wp_slash( $arr ) ); // Keyed array
    83         $this->assertEquals( array_values( $arr ), wp_slash( array_values( $arr ) ) ); // Non-keyed
     81        $arr['e'] = $arr; // Add a sub-array.
     82        $this->assertEquals( $arr, wp_slash( $arr ) ); // Keyed array.
     83        $this->assertEquals( array_values( $arr ), wp_slash( array_values( $arr ) ) ); // Non-keyed.
    8484
    8585        $obj = new stdClass;
     
    9797        $new = 'single\\\\slash double\\\\\\\\slash triple\\\\\\\\\\\\slash';
    9898        $this->assertEquals( $new, wp_slash( $old ) );
    99         $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array
    100         $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed
     99        $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array.
     100        $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed.
    101101    }
    102102
Note: See TracChangeset for help on using the changeset viewer.