diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index ef4d23debb..1a53c12eda 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1270,6 +1270,7 @@ function wp_remote_fopen( $uri ) { */ function wp( $query_vars = '' ) { global $wp, $wp_query, $wp_the_query; + $wp->main( $query_vars ); if ( ! isset( $wp_the_query ) ) { diff --git a/tests/phpunit/tests/functions/wp.php b/tests/phpunit/tests/functions/wp.php new file mode 100644 index 0000000000..80654a8526 --- /dev/null +++ b/tests/phpunit/tests/functions/wp.php @@ -0,0 +1,19 @@ +assertInstanceOf( 'WP', $wp ); + $this->assertInstanceOf( 'WP_Query', $wp_query ); + $this->assertInstanceOf( 'WP_Query', $wp_the_query ); + } + +} diff --git a/tests/phpunit/tests/functions/wpAuthCheck.php b/tests/phpunit/tests/functions/wpAuthCheck.php index b8e9d2c645..32aafdddb1 100644 --- a/tests/phpunit/tests/functions/wpAuthCheck.php +++ b/tests/phpunit/tests/functions/wpAuthCheck.php @@ -1,9 +1,9 @@