<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[34802] trunk/tests/phpunit: Tests: Introduce `WP_UnitTestCase::reset_permalinks()`, an attempt to DRY up logic for resetting and restoring default permalinks on `setUp()` and `tearDown()`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/34802">34802</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/34802","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>DrewAPicture</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-10-03 17:14:12 +0000 (Sat, 03 Oct 2015)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Introduce `WP_UnitTestCase::reset_permalinks()`, an attempt to DRY up logic for resetting and restoring default permalinks on `setUp()` and `tearDown()`.

See <a href="https://core.trac.wordpress.org/ticket/33968">#33968</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludestestcasecanonicalphp">trunk/tests/phpunit/includes/testcase-canonical.php</a></li>
<li><a href="#trunktestsphpunitincludestestcasephp">trunk/tests/phpunit/includes/testcase.php</a></li>
<li><a href="#trunktestsphpunitincludesutilsphp">trunk/tests/phpunit/includes/utils.php</a></li>
<li><a href="#trunktestsphpunittestsadminincludesPostphp">trunk/tests/phpunit/tests/admin/includesPost.php</a></li>
<li><a href="#trunktestsphpunittestscommentcommentsTemplatephp">trunk/tests/phpunit/tests/comment/commentsTemplate.php</a></li>
<li><a href="#trunktestsphpunittestsfeedrss2php">trunk/tests/phpunit/tests/feed/rss2.php</a></li>
<li><a href="#trunktestsphpunittestsgeneralpaginateLinksphp">trunk/tests/phpunit/tests/general/paginateLinks.php</a></li>
<li><a href="#trunktestsphpunittestslinkgetNextCommentsLinkphp">trunk/tests/phpunit/tests/link/getNextCommentsLink.php</a></li>
<li><a href="#trunktestsphpunittestslinkgetPostCommentsFeedLinkphp">trunk/tests/phpunit/tests/link/getPostCommentsFeedLink.php</a></li>
<li><a href="#trunktestsphpunittestslinkgetPreviousCommentsLinkphp">trunk/tests/phpunit/tests/link/getPreviousCommentsLink.php</a></li>
<li><a href="#trunktestsphpunittestslinkphp">trunk/tests/phpunit/tests/link.php</a></li>
<li><a href="#trunktestsphpunittestspostwpUniquePostSlugphp">trunk/tests/phpunit/tests/post/wpUniquePostSlug.php</a></li>
<li><a href="#trunktestsphpunittestspostphp">trunk/tests/phpunit/tests/post.php</a></li>
<li><a href="#trunktestsphpunittestsqueryresultsphp">trunk/tests/phpunit/tests/query/results.php</a></li>
<li><a href="#trunktestsphpunittestsrewritenumericSlugsphp">trunk/tests/phpunit/tests/rewrite/numericSlugs.php</a></li>
<li><a href="#trunktestsphpunittestsrewriteoldSlugRedirectphp">trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php</a></li>
<li><a href="#trunktestsphpunitteststermgetTermLinkphp">trunk/tests/phpunit/tests/term/getTermLink.php</a></li>
<li><a href="#trunktestsphpunittestsuserauthorphp">trunk/tests/phpunit/tests/user/author.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludestestcasecanonicalphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-canonical.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-canonical.php       2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/includes/testcase-canonical.php 2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,17 +16,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public $structure = '/%year%/%monthnum%/%day%/%postname%/';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function setUp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-
</del><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'page_comments', true );
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'comments_per_page', 5 );
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'posts_per_page', 5 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                global $wp_rewrite;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $wp_rewrite->init();
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_rewrite->set_permalink_structure( $this->structure );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 create_initial_taxonomies();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $wp_rewrite->flush_rules();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunitincludestestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase.php 2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/includes/testcase.php   2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,6 +16,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        protected $db_version;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public static $default_permalink_structure;
+
</ins><span class="cx" style="display: block; padding: 0 10px">         /**
</span><span class="cx" style="display: block; padding: 0 10px">         * @var WP_UnitTest_Factory
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,6 +72,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        add_filter( 'pre_option_db_version', array( $this, 'db_version' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               self::$default_permalink_structure = get_option( 'permalink_structure' );
+
+               $this->reset_permalinks();
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,6 +105,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->_restore_hooks();
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( 0 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               $this->reset_permalinks( $restore = true );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function clean_up_global_scope() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -645,4 +653,30 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function db_version() {
</span><span class="cx" style="display: block; padding: 0 10px">                return $this->db_version;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       /**
+        * Utility method that resets permalinks and flushes rewrites.
+        *
+        * Collects the current permalink structure and stores it in a class property for use
+        * by sub-classes.
+        *
+        * @since 4.4.0
+        *
+        * @global WP_Rewrite $wp_rewrite
+        *
+        * @param bool $restore_default Optional. Whether to restore the default permalink structure.
+        *                              Default false.
+        */
+       public function reset_permalinks( $restore_default = false ) {
+               global $wp_rewrite;
+
+               if ( ! $restore_default ) {
+                       $wp_rewrite->init();
+                       $wp_rewrite->set_permalink_structure( '' );
+               } else {
+                       $wp_rewrite->set_permalink_structure( self::$default_permalink_structure );
+               }
+
+               $wp_rewrite->flush_rules();
+       }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunitincludesutilsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/utils.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/utils.php    2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/includes/utils.php      2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -447,4 +447,4 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        return $i;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></span></pre></div>
<a id="trunktestsphpunittestsadminincludesPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/includesPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesPost.php  2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/admin/includesPost.php    2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -253,7 +253,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_sample_permalink_should_return_pretty_permalink_for_posts_with_post_status_future() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_rewrite;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $old_permalink_structure = get_option( 'permalink_structure' );
</del><span class="cx" style="display: block; padding: 0 10px">                 $permalink_structure = '%postname%';
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_rewrite->set_permalink_structure( "/$permalink_structure/" );
</span><span class="cx" style="display: block; padding: 0 10px">                flush_rewrite_rules();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -265,9 +264,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = trailingslashit( home_url( $permalink_structure ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, $found[0] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( $old_permalink_structure );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -275,11 +271,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 18306
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_sample_permalink_html_should_use_default_permalink_for_view_post_link_when_pretty_permalinks_are_disabled() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-               $old_permalink_structure = get_option( 'permalink_structure' );
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $future_date = date( 'Y-m-d H:i:s', time() + 100 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -287,9 +278,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink_html( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertContains( 'href="' . get_option( 'home' ) . '/?p=' . $p . '"', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( $old_permalink_structure );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,7 +286,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_sample_permalink_html_should_use_pretty_permalink_for_view_post_link_when_pretty_permalinks_are_enabled() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_rewrite;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $old_permalink_structure = get_option( 'permalink_structure' );
</del><span class="cx" style="display: block; padding: 0 10px">                 $permalink_structure = '%postname%';
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_rewrite->set_permalink_structure( "/$permalink_structure/" );
</span><span class="cx" style="display: block; padding: 0 10px">                flush_rewrite_rules();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -311,9 +298,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink_html( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertContains( 'href="' . get_option( 'home' ) . "/" . $post->post_name . '/"', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( $old_permalink_structure );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -322,7 +306,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_sample_permalink_html_should_use_correct_permalink_for_view_post_link_when_changing_slug() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_rewrite;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $old_permalink_structure = get_option( 'permalink_structure' );
</del><span class="cx" style="display: block; padding: 0 10px">                 $permalink_structure = '%postname%';
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_rewrite->set_permalink_structure( "/$permalink_structure/" );
</span><span class="cx" style="display: block; padding: 0 10px">                flush_rewrite_rules();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -357,9 +340,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $preview_link = add_query_arg( 'preview', 'true', $preview_link );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertContains( 'href="' . esc_url( $preview_link ) . '"', $found, $message );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( $old_permalink_structure );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -377,9 +357,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015-2', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -397,9 +374,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -417,9 +391,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '11-2', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -437,9 +408,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '13', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,9 +425,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '30-2', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -481,9 +446,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '30-3', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -501,9 +463,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '32', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -521,9 +480,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = get_sample_permalink( $p );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '30', $found[1] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_match_title() {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentcommentsTemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/commentsTemplate.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/commentsTemplate.php    2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/comment/commentsTemplate.php      2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,14 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * Testing items that are only testable by grabbing the markup of `comments_template()` from the output buffer.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Comment_CommentsTemplate extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function setUp() {
-               parent::setUp();
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         /**
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 8071
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span></span></pre></div>
<a id="trunktestsphpunittestsfeedrss2php"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/feed/rss2.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/feed/rss2.php   2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/feed/rss2.php     2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,8 +9,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @group feed
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Feed_RSS2 extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        private $permalink_structure = '';
-
</del><span class="cx" style="display: block; padding: 0 10px">         static $user;
</span><span class="cx" style="display: block; padding: 0 10px">        static $posts;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,11 +38,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function setUp() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-               $this->permalink_structure = get_option( 'permalink_structure' );
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->post_count = get_option('posts_per_rss');
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,12 +46,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                update_option('use_smilies', false);
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function tearDown() {
-               global $wp_rewrite;
-               $wp_rewrite->set_permalink_structure( $this->permalink_structure );
-               $wp_rewrite->flush_rules();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         function do_rss2() {
</span><span class="cx" style="display: block; padding: 0 10px">                ob_start();
</span><span class="cx" style="display: block; padding: 0 10px">                // nasty hack
</span></span></pre></div>
<a id="trunktestsphpunittestsgeneralpaginateLinksphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/general/paginateLinks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/general/paginateLinks.php       2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/general/paginateLinks.php 2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,23 +3,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Paginate_Links extends WP_UnitTestCase {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        private $i18n_count = 0;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        private $permalink_structure = '';
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><span class="cx" style="display: block; padding: 0 10px">                parent::setUp();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( home_url( '/' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $this->permalink_structure = $wp_rewrite->permalink_structure;
-               $wp_rewrite->set_permalink_structure( get_option( 'permalink_structure' ) );
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        function tearDown() {
-               global $wp_rewrite;
-               $wp_rewrite->set_permalink_structure( $this->permalink_structure );
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         function test_defaults() {
</span><span class="cx" style="display: block; padding: 0 10px">                $page2 = get_pagenum_link( 2 );
</span><span class="cx" style="display: block; padding: 0 10px">                $page3 = get_pagenum_link( 3 );
</span></span></pre></div>
<a id="trunktestsphpunittestslinkgetNextCommentsLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/link/getNextCommentsLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/link/getNextCommentsLink.php    2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/link/getNextCommentsLink.php      2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,15 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @covers ::get_next_comments_link
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Link_GetNextCommentsLink extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function setUp() {
-               global $wp_rewrite;
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
-
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_page_should_respect_value_of_cpage_query_var() {
</span><span class="cx" style="display: block; padding: 0 10px">                $p = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $p ) );
</span></span></pre></div>
<a id="trunktestsphpunittestslinkgetPostCommentsFeedLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/link/getPostCommentsFeedLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/link/getPostCommentsFeedLink.php        2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/link/getPostCommentsFeedLink.php  2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,39 +3,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @group link
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Link_GetPostCommentsFeedLink extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        private static $rewrite;
-       private static $permalink_structure;
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        static function setUpBeforeClass() {
-               global $wp_rewrite;
-
-               parent::setUpBeforeClass();
-
-               self::$rewrite = $wp_rewrite;
-               self::$permalink_structure = get_option( 'permalink_structure' );
-       }
-
-       public static function tearDownAfterClass() {
-               parent::tearDownAfterClass();
-
-               self::$rewrite->init();
-               self::$rewrite->set_permalink_structure( self::$permalink_structure );
-               self::$rewrite->flush_rules();
-       }
-
-       public function setUp() {
-               parent::setUp();
-               self::$rewrite->init();
-       }
-
-       private function set_permalink_structure( $structure ) {
-               self::$rewrite->set_permalink_structure( $structure );
-               self::$rewrite->flush_rules();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_post_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $link = get_post_comments_feed_link( $post_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +17,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_pretty_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         global $wp_rewrite;
+               $wp_rewrite->init();
+               $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
+               $wp_rewrite->flush_rules();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,8 +31,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_attachment_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px">                $attachment_id = $this->factory->attachment->create_object( 'image.jpg', $post_id, array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_mime_type' => 'image/jpeg',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,7 +47,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_attachment_pretty_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         global $wp_rewrite;
+               $wp_rewrite->init();
+               $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
+               $wp_rewrite->flush_rules();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = $this->factory->post->create( array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_status' => 'publish'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,7 +70,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_attachment_no_name_pretty_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         global $wp_rewrite;
+               $wp_rewrite->init();
+               $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
+               $wp_rewrite->flush_rules();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px">                $attachment_id = $this->factory->attachment->create_object( 'image.jpg', $post_id, array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -112,8 +88,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_unattached_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $attachment_id = $this->factory->attachment->create_object( 'image.jpg', 0, array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_mime_type' => 'image/jpeg',
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_type' => 'attachment'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,7 +103,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_unattached_pretty_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         global $wp_rewrite;
+               $wp_rewrite->init();
+               $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
+               $wp_rewrite->flush_rules();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $attachment_id = $this->factory->attachment->create_object( 'image.jpg', 0, array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_mime_type' => 'image/jpeg',
</span></span></pre></div>
<a id="trunktestsphpunittestslinkgetPreviousCommentsLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/link/getPreviousCommentsLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/link/getPreviousCommentsLink.php        2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/link/getPreviousCommentsLink.php  2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,15 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @covers ::get_previous_comments_link
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Link_GetPreviousCommentsLink extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function setUp() {
-               global $wp_rewrite;
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                parent::setUp();
-
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_page_should_respect_value_of_cpage_query_var() {
</span><span class="cx" style="display: block; padding: 0 10px">                $p = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $p ) );
</span></span></pre></div>
<a id="trunktestsphpunittestslinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/link.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/link.php        2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/link.php  2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,10 +40,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id2 = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $wp_rewrite->init();
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Basic case
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( get_permalink( $post_id ), wp_get_shortlink( $post_id, 'post' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestspostwpUniquePostSlugphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post/wpUniquePostSlug.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/wpUniquePostSlug.php       2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/post/wpUniquePostSlug.php 2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,9 +181,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '2015', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015-2', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -203,9 +200,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '2015', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015-2', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,9 +218,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '2015', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -245,9 +236,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '11', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '11-2', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -266,9 +254,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '11', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '11', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -287,9 +272,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '13', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '13', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -308,9 +290,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '30', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '30-2', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -329,9 +308,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '30', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '30', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -350,8 +326,5 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $found = wp_unique_post_slug( '32', $p, 'publish', 'post', 0 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '32', $found );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( '' );
-               flush_rewrite_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestspostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post.php        2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/post.php  2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -429,7 +429,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post = get_post( $p );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $wp_rewrite->set_permalink_structure( '' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->reset_permalinks();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( "$p-2", $post->post_name );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -525,8 +525,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // permalink should include the post ID at the end
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals(get_option('siteurl').'/2007/10/31/'.$id.'/', $plink);
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre></div>
<a id="trunktestsphpunittestsqueryresultsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/query/results.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/results.php       2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/query/results.php 2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -683,12 +683,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 29615
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_child_post_in_hierarchical_post_type_with_default_permalinks() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-
-               $old_permastruct = get_option( 'permalink_structure' );
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 register_post_type( 'handbook', array( 'hierarchical' => true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post_1 = $this->factory->post->create( array( 'post_title' => 'Contributing to the WordPress Codex', 'post_type' => 'handbook' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -698,9 +692,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $result = $this->q->query( array( 'handbook' => 'contributing-to-the-wordpress-codex/getting-started', 'post_type' => 'handbook' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertCount( 1, $result );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure( $old_permastruct );
-               $wp_rewrite->flush_rules();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function test_title() {
</span></span></pre></div>
<a id="trunktestsphpunittestsrewritenumericSlugsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rewrite/numericSlugs.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rewrite/numericSlugs.php        2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/rewrite/numericSlugs.php  2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,8 +47,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( '2015' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_year_segment_collision_without_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,8 +75,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2015', url_to_postid( get_permalink( '2015' ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_year_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,8 +94,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_year_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,8 +111,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_month_segment_collision_without_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,8 +131,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_month_segment_collision_without_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,8 +149,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_month_segment_collision_without_title_no_leading_zero() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,8 +169,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_month_segment_collision_without_title_no_leading_zero() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -201,8 +187,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_month_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -222,8 +206,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_month_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -241,8 +223,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_month_segment_collision_with_title_no_leading_zero() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -262,8 +242,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_month_segment_collision_with_title_no_leading_zero() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -281,8 +259,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_day_segment_collision_without_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -303,8 +279,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_day_segment_collision_without_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -323,8 +297,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_go_to_day_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -344,8 +316,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->go_to( get_permalink( $id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertQueryTrue( 'is_single', 'is_singular' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_url_to_postid_day_segment_collision_with_title() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -363,8 +333,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_numeric_slug_permalink_conflicts_should_only_be_resolved_for_the_main_query() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -389,8 +357,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertTrue( $q->is_day );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertFalse( $q->is_single );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               $wp_rewrite->set_permalink_structure('');
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_month_slug_collision_should_resolve_to_date_archive_when_year_does_not_match_post_year() {
</span></span></pre></div>
<a id="trunktestsphpunittestsrewriteoldSlugRedirectphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php     2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php       2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,11 +34,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->old_slug_redirect_url = null;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                remove_filter( 'old_slug_redirect_url', array( $this, 'filter_old_slug_redirect_url' ), 10 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               global $wp_rewrite;
-
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->init();
</del><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_old_slug_redirect() {
</span></span></pre></div>
<a id="trunktestsphpunitteststermgetTermLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/term/getTermLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/getTermLink.php    2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/term/getTermLink.php      2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,28 +4,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @group taxonomy
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Term_GetTermLink extends WP_UnitTestCase {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        private $permalink_structure;
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function setUp() {
</span><span class="cx" style="display: block; padding: 0 10px">                parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Assume no pretty permalinks.
-               global $wp_rewrite;
-               $this->permalink_structure = get_option( 'permalink_structure' );
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 register_taxonomy( 'wptests_tax', 'post' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function tearDown() {
-               global $wp_rewrite;
-               $wp_rewrite->set_permalink_structure( $this->permalink_structure );
-               $wp_rewrite->flush_rules();
-
-               parent::tearDown();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_integer_should_be_interpreted_as_term_id() {
</span><span class="cx" style="display: block; padding: 0 10px">                $t1 = $this->factory->term->create( array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'taxonomy' => 'wptests_tax',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,7 +86,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_taxonomy_permastruct_with_hierarchical_rewrite_should_put_term_ancestors_in_link() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_rewrite;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $permalink_structure = get_option( 'permalink_structure' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $wp_rewrite->init();
</ins><span class="cx" style="display: block; padding: 0 10px">                 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_rewrite->flush_rules();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,9 +111,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $actual = get_term_link( $t2, 'wptests_tax2' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $wp_rewrite->set_permalink_structure( $permalink_structure );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->assertContains( '/foo/term1/term2/', $actual );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,9 +141,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $actual = get_term_link( $t2, 'wptests_tax2' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $wp_rewrite->set_permalink_structure( $permalink_structure );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->assertContains( '/foo/term2/', $actual );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsuserauthorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/user/author.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/author.php 2015-10-03 15:09:57 UTC (rev 34801)
+++ trunk/tests/phpunit/tests/user/author.php   2015-10-03 17:14:12 UTC (rev 34802)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,11 +15,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        function setUp() {
</span><span class="cx" style="display: block; padding: 0 10px">                parent::setUp();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-               $this->permalink_structure = get_option( 'permalink_structure' );
-               $wp_rewrite->set_permalink_structure( '' );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->author_id = $this->factory->user->create( array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'role' => 'author',
</span><span class="cx" style="display: block; padding: 0 10px">                        'user_login' => 'test_author',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,10 +37,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        function tearDown() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                global $wp_rewrite;
-               $wp_rewrite->set_permalink_structure( $this->permalink_structure );
-               $wp_rewrite->flush_rules();
-
</del><span class="cx" style="display: block; padding: 0 10px">                 wp_reset_postdata();
</span><span class="cx" style="display: block; padding: 0 10px">                parent::tearDown();
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre>
</div>
</div>

</body>
</html>