mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user