Make WordPress Core


Ignore:
Timestamp:
09/12/2013 05:30:01 PM (11 years ago)
Author:
wonderboymusic
Message:

Fix the failing Tests_Link::test_wp_get_shortlink() assertion:

  • wp_get_shortlink() was firing a notice when reading $post->ID while $post was null in some cases
  • Before the assertions that assume $GLOBALS['post'] is not set, call unset( $GLOBALS['post'] ); - there was global spillage from other tests

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link.php

    r25030 r25404  
    3535        // Basic case
    3636        $this->assertEquals( get_permalink( $post_id ), wp_get_shortlink( $post_id, 'post' ) );
     37
     38        unset( $GLOBALS['post'] );
    3739
    3840        // Global post is not set
Note: See TracChangeset for help on using the changeset viewer.