WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/16/2014 04:22:16 AM (5 years ago)
Author:
wonderboymusic
Message:

Fix Tests_Paginate_Links tests by properly setting up / tearing down permalink structure.

Props jorbin.
Fixes #29636.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/paginateLinks.php

    r29780 r29913  
    44
    55    private $i18n_count = 0;
     6    private $permalink_structure = '';
    67
    78    function setUp() {
    89        parent::setUp();
     10        global $wp_rewrite;
    911
    1012        $this->go_to( home_url( '/' ) );
     13
     14        $this->permalink_structure = $wp_rewrite->permalink_structure;
     15        $wp_rewrite->set_permalink_structure( get_option( 'permalink_structure' ) );
     16    }
     17
     18    function tearDown() {
     19        global $wp_rewrite;
     20        $wp_rewrite->set_permalink_structure( $this->permalink_structure );
    1121    }
    1222
Note: See TracChangeset for help on using the changeset viewer.