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

Props jorbin.
Fixes #29636.


git-svn-id: https://develop.svn.wordpress.org/trunk@29913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-10-16 04:22:16 +00:00
parent e36cac6794
commit 248fc182b8
1 changed files with 10 additions and 0 deletions

View File

@ -3,11 +3,21 @@
class Tests_Paginate_Links extends WP_UnitTestCase {
private $i18n_count = 0;
private $permalink_structure = '';
function setUp() {
parent::setUp();
global $wp_rewrite;
$this->go_to( home_url( '/' ) );
$this->permalink_structure = $wp_rewrite->permalink_structure;
$wp_rewrite->set_permalink_structure( get_option( 'permalink_structure' ) );
}
function tearDown() {
global $wp_rewrite;
$wp_rewrite->set_permalink_structure( $this->permalink_structure );
}
function test_defaults() {