Make WordPress Core

Changeset 46987


Ignore:
Timestamp:
12/18/2019 12:26:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve comments in tests/formatting/redirect.php per the documentation standards.

See #48303.

File:
1 edited

Legend:

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

    r46649 r46987  
    3636        public function get_bad_status_codes() {
    3737                return array(
    38                         // Tests for bad arguments
     38                        // Tests for bad arguments.
    3939                        array( '/wp-admin', 404 ),
    4040                        array( '/wp-admin', 410 ),
    … …  
    5353                $this->assertEquals( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay', wp_sanitize_redirect( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay' ) );
    5454                $this->assertEquals( 'http://example.com/watchtheutf8convert%F0%9D%8C%86', wp_sanitize_redirect( "http://example.com/watchtheutf8convert\xf0\x9d\x8c\x86" ) );
    55                 //Nesting checks
     55                // Nesting checks.
    5656                $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) );
    5757                $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) );
    … …  
    102102        function invalid_url_provider() {
    103103                return array(
    104                         // parse_url() fails
     104                        // parse_url() fails.
    105105                        array( '' ),
    106106                        array( 'http://:' ),
    107107
    108                         // non-safelisted domain
     108                        // Non-safelisted domain.
    109109                        array( 'http://non-safelisted.example/' ),
    110110
    111                         // non-safelisted domain (leading whitespace)
     111                        // Non-safelisted domain (leading whitespace).
    112112                        array( " \t\n\r\0\x08\x0Bhttp://non-safelisted.example.com" ),
    113113                        array( " \t\n\r\0\x08\x0B//non-safelisted.example.com" ),
    114114
    115                         // unsupported schemes
     115                        // Unsupported schemes.
    116116                        array( 'data:text/plain;charset=utf-8,Hello%20World!' ),
    117117                        array( 'file:///etc/passwd' ),
    118118                        array( 'ftp://example.com/' ),
    119119
    120                         // malformed input
     120                        // Malformed input.
    121121                        array( 'http:example.com' ),
    122122                        array( 'http:80' ),
Note: See TracChangeset for help on using the changeset viewer.