From 8692cdbecda3101e32164f307e2f3e65ec0a93ef Mon Sep 17 00:00:00 2001 From: Eric Andrew Lewis Date: Wed, 27 Apr 2016 18:24:34 +0000 Subject: [PATCH] Build/Test Tools: Document `WP_UnitTestCase->go_to()` Fixes #36679. git-svn-id: https://develop.svn.wordpress.org/trunk@37319 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/testcase.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index 27aabbf906..6c893cef49 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -412,6 +412,11 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase { $this->assertEquals( $expected, $actual ); } + /** + * Modify WordPress's query internals as if a given URL has been requested. + * + * @param string $url The URL for the request. + */ 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