Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-01-29 00:43:23 +00:00
parent bd2cd572aa
commit cfc3b57488
810 changed files with 9893 additions and 8384 deletions
+11 -8
View File
@@ -499,7 +499,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
$errors[] = "Unexpected incorrect usage notice for $unexpected";
}
// Perform an assertion, but only if there are expected or unexpected deprecated calls or wrongdoings
// Perform an assertion, but only if there are expected or unexpected deprecated calls or wrongdoings.
if ( ! empty( $this->expected_deprecated ) ||
! empty( $this->expected_doing_it_wrong ) ||
! empty( $this->caught_deprecated ) ||
@@ -727,9 +727,11 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
* @param string $url The URL for the request.
*/
public function go_to( $url ) {
// note: the WP and WP_Query classes like to silently fetch parameters
// from all over the place (globals, GET, etc), which makes it tricky
// to run them more than once without very carefully clearing everything
/*
* Note: the WP and WP_Query classes like to silently fetch parameters
* from all over the place (globals, GET, etc), which makes it tricky
* to run them more than once without very carefully clearing everything.
*/
$_GET = array();
$_POST = array();
foreach ( array( 'query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow', 'current_screen' ) as $v ) {
@@ -742,7 +744,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
$req = isset( $parts['path'] ) ? $parts['path'] : '';
if ( isset( $parts['query'] ) ) {
$req .= '?' . $parts['query'];
// parse the url query vars into $_GET
// Parse the URL query vars into $_GET.
parse_str( $parts['query'], $_GET );
}
} else {
@@ -777,8 +779,8 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
*
* This is a custom extension of the PHPUnit requirements handling.
*
* Contains legacy code for skipping tests that are associated with an open Trac ticket. Core tests no longer
* support this behaviour.
* Contains legacy code for skipping tests that are associated with an open Trac ticket.
* Core tests no longer support this behaviour.
*
* @since 3.5.0
*/
@@ -805,7 +807,8 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
}
}
// Core tests no longer check against open Trac tickets, but others using WP_UnitTestCase may do so.
// Core tests no longer check against open Trac tickets,
// but others using WP_UnitTestCase may do so.
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
return;
}