WordPress.org

Make WordPress Core

Changeset 1292 in tests


Ignore:
Timestamp:
05/30/2013 02:51:53 PM (9 years ago)
Author:
ryan
Message:

Set $wp-query->post so that test_setup_postdata_loop() runs clean when running the entire test suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/query.php

    r1290 r1292  
    4444    function test_setup_postdata_loop() {
    4545        $post_id = $this->factory->post->create( array( 'post_content' => 'global post' ) );
    46         $GLOBALS['post'] = get_post( $post_id );
     46        $GLOBALS['wp_query']->post = $GLOBALS['post'] = get_post( $post_id );
    4747
    4848        $ids = $this->factory->post->create_many(5);
Note: See TracChangeset for help on using the changeset viewer.