wordpress-develop/tests/phpunit/tests/functions/wp.php
Sergey Biryukov 2aecc8f3e6 Tests: Add a basic test for wp() function.
Props pbearne, donmhico.
Fixes #48844.

git-svn-id: https://develop.svn.wordpress.org/trunk@47212 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-08 05:29:54 +00:00

20 lines
357 B
PHP

<?php
/**
* @group functions.php
* @group query
*/
class Tests_Functions_WP extends WP_UnitTestCase {
public function test_wp_sets_global_vars() {
global $wp, $wp_query, $wp_the_query;
wp();
$this->assertInstanceOf( 'WP', $wp );
$this->assertInstanceOf( 'WP_Query', $wp_query );
$this->assertInstanceOf( 'WP_Query', $wp_the_query );
}
}