Make WordPress Core

Changeset 28961


Ignore:
Timestamp:
07/02/2014 07:49:05 PM (10 years ago)
Author:
wonderboymusic
Message:

test_wp_get_shortlink() assumes permalink structure is when it starts. It is not.

See #28706.

File:
1 edited

Legend:

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

    r27836 r28961  
    3030
    3131    function test_wp_get_shortlink() {
     32        global $wp_rewrite;
     33
    3234        $post_id = $this->factory->post->create();
    3335        $post_id2 = $this->factory->post->create();
     36
     37        $wp_rewrite->permalink_structure = '';
     38        $wp_rewrite->set_permalink_structure( '' );
    3439
    3540        // Basic case
     
    6065        $this->assertEquals( '', wp_get_shortlink() );
    6166
    62         global $wp_rewrite;
    6367        $wp_rewrite->permalink_structure = '';
    6468        $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
Note: See TracChangeset for help on using the changeset viewer.