mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 06:10:09 +00:00
Setup rewrite changes in tests in a predictable fashion. Don't mix method calls with wrapper function calls.
See #28706. git-svn-id: https://develop.svn.wordpress.org/trunk@28966 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -23,15 +23,19 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
update_option( 'posts_per_page', 5 );
|
||||
|
||||
global $wp_rewrite;
|
||||
update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );
|
||||
|
||||
$wp_rewrite->init();
|
||||
$wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
|
||||
|
||||
create_initial_taxonomies();
|
||||
$GLOBALS['wp_rewrite']->init();
|
||||
flush_rewrite_rules();
|
||||
|
||||
$wp_rewrite->flush_rules();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
global $wp_rewrite;
|
||||
parent::tearDown();
|
||||
$GLOBALS['wp_rewrite']->init();
|
||||
$wp_rewrite->init();
|
||||
}
|
||||
|
||||
function test_home() {
|
||||
|
||||
Reference in New Issue
Block a user