WordPress.org

Make WordPress Core

Ticket #48844: 48844.patch

File 48844.patch, 831 bytes (added by pbearne, 2 years ago)
  • tests/phpunit/tests/functions/wp.php

     
     1<?php
     2/**
     3 * wordpress-develop.
     4 * User: Paul
     5 * Date: 2019-11-20
     6 *
     7 */
     8
     9if ( ! defined( 'WPINC' ) ) {
     10        die;
     11}
     12
     13class Tests_Functions_WP extends WP_UnitTestCase {
     14
     15        public function test_wp_sets_global_var_to_class() {
     16                global $wp, $wp_query, $wp_the_query;
     17
     18                wp();
     19                $this->assertInstanceOf( WP::class, $wp );
     20        $this->assertInstanceOf( WP_Query::class, $wp_query );
     21        $this->assertInstanceOf( WP_Query::class, $wp_the_query );
     22
     23        $this->assertSame( $wp_query, $wp_the_query );
     24        }
     25
     26}
     27 No newline at end of file