Better rewrite rule flushing in `test_permalink_without_title()`.

This ensures that the test is not polluted by permalink structure changes in
earlier tests.

git-svn-id: https://develop.svn.wordpress.org/trunk@30529 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2014-11-23 01:19:04 +00:00
parent b44106c380
commit e61c9fecbd
1 changed files with 2 additions and 0 deletions

View File

@ -446,7 +446,9 @@ class Tests_Post extends WP_UnitTestCase {
// might only fail if the post ID is greater than four characters // might only fail if the post ID is greater than four characters
global $wp_rewrite; global $wp_rewrite;
$wp_rewrite->init();
$wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/'); $wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/');
$wp_rewrite->flush_rules();
$post = array( $post = array(
'post_author' => $this->author_id, 'post_author' => $this->author_id,