From c8ac42b3dd9cc7164d7c5ebdb5b7aeac47ac5b48 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 18 Dec 2019 00:26:23 +0000 Subject: [PATCH] Docs: Improve comments in `tests/formatting/redirect.php` per the documentation standards. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@46987 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/formatting/redirect.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/tests/formatting/redirect.php b/tests/phpunit/tests/formatting/redirect.php index ff897b094c..c79e1433eb 100644 --- a/tests/phpunit/tests/formatting/redirect.php +++ b/tests/phpunit/tests/formatting/redirect.php @@ -35,7 +35,7 @@ class Tests_Formatting_Redirect extends WP_UnitTestCase { public function get_bad_status_codes() { return array( - // Tests for bad arguments + // Tests for bad arguments. array( '/wp-admin', 404 ), array( '/wp-admin', 410 ), array( '/wp-admin', 500 ), @@ -52,7 +52,7 @@ class Tests_Formatting_Redirect extends WP_UnitTestCase { $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0dgo' ) ); $this->assertEquals( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay', wp_sanitize_redirect( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay' ) ); $this->assertEquals( 'http://example.com/watchtheutf8convert%F0%9D%8C%86', wp_sanitize_redirect( "http://example.com/watchtheutf8convert\xf0\x9d\x8c\x86" ) ); - //Nesting checks + // Nesting checks. $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) ); $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) ); $this->assertEquals( 'http://example.com/whyisthisintheurl/?param[1]=foo', wp_sanitize_redirect( 'http://example.com/whyisthisintheurl/?param[1]=foo' ) ); @@ -101,23 +101,23 @@ class Tests_Formatting_Redirect extends WP_UnitTestCase { function invalid_url_provider() { return array( - // parse_url() fails + // parse_url() fails. array( '' ), array( 'http://:' ), - // non-safelisted domain + // Non-safelisted domain. array( 'http://non-safelisted.example/' ), - // non-safelisted domain (leading whitespace) + // Non-safelisted domain (leading whitespace). array( " \t\n\r\0\x08\x0Bhttp://non-safelisted.example.com" ), array( " \t\n\r\0\x08\x0B//non-safelisted.example.com" ), - // unsupported schemes + // Unsupported schemes. array( 'data:text/plain;charset=utf-8,Hello%20World!' ), array( 'file:///etc/passwd' ), array( 'ftp://example.com/' ), - // malformed input + // Malformed input. array( 'http:example.com' ), array( 'http:80' ), array( 'http://example.com:1234:5678/' ),