From e61c9fecbd7caa83609b62483072ee77658c8a1a Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sun, 23 Nov 2014 01:19:04 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index 9817bba6ee..23754589dd 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -446,7 +446,9 @@ class Tests_Post extends WP_UnitTestCase { // might only fail if the post ID is greater than four characters global $wp_rewrite; + $wp_rewrite->init(); $wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/'); + $wp_rewrite->flush_rules(); $post = array( 'post_author' => $this->author_id,