<!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>[38858] trunk: Tests: Use a minimal theme for tests.</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/38858">38858</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/38858","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>pento</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-10-21 11:02:37 +0000 (Fri, 21 Oct 2016)</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: Use a minimal theme for tests.

New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.

This change also removes the old workarounds for default themes.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitdatathemedir1defaultfunctionsphp">trunk/tests/phpunit/data/themedir1/default/functions.php</a></li>
<li><a href="#trunktestsphpunitdatathemedir1defaultindexphp">trunk/tests/phpunit/data/themedir1/default/index.php</a></li>
<li><a href="#trunktestsphpunitincludesbootstrapphp">trunk/tests/phpunit/includes/bootstrap.php</a></li>
<li><a href="#trunktestsphpunitincludesfunctionsphp">trunk/tests/phpunit/includes/functions.php</a></li>
<li><a href="#trunktestsphpunittestscustomizecontrolphp">trunk/tests/phpunit/tests/customize/control.php</a></li>
<li><a href="#trunktestsphpunittestscustomizecustomcsssettingphp">trunk/tests/phpunit/tests/customize/custom-css-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizemanagerphp">trunk/tests/phpunit/tests/customize/manager.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenuitemsettingphp">trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenusettingphp">trunk/tests/phpunit/tests/customize/nav-menu-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenusphp">trunk/tests/phpunit/tests/customize/nav-menus.php</a></li>
<li><a href="#trunktestsphpunittestscustomizepartialphp">trunk/tests/phpunit/tests/customize/partial.php</a></li>
<li><a href="#trunktestsphpunittestscustomizeselectiverefreshajaxphp">trunk/tests/phpunit/tests/customize/selective-refresh-ajax.php</a></li>
<li><a href="#trunktestsphpunittestscustomizeselectiverefreshphp">trunk/tests/phpunit/tests/customize/selective-refresh.php</a></li>
<li><a href="#trunktestsphpunittestscustomizewidgetsphp">trunk/tests/phpunit/tests/customize/widgets.php</a></li>
<li><a href="#trunktestsphpunittestsmediaphp">trunk/tests/phpunit/tests/media.php</a></li>
<li><a href="#trunkwptestsconfigsamplephp">trunk/wp-tests-config-sample.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunktestsphpunitdatathemedir1defaultcommentsphp">trunk/tests/phpunit/data/themedir1/default/comments.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitdatathemedir1defaultcommentsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/tests/phpunit/data/themedir1/default/comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/themedir1/default/comments.php                           (rev 0)
+++ trunk/tests/phpunit/data/themedir1/default/comments.php     2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,4 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+// Minimal comment template
+wp_list_comments();
</ins></span></pre></div>
<a id="trunktestsphpunitdatathemedir1defaultfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/themedir1/default/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/themedir1/default/functions.php  2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/data/themedir1/default/functions.php    2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// dummy theme
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Minimum functions.php to pass unit tests
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-echo dirname(__FILE__).'/'.basename(__FILE__);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function default_widgets_init() {
+       register_sidebar( array( 'id' => 'sidebar-1' ) );
+}
+add_action( 'widgets_init', 'default_widgets_init' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function default_after_setup_theme() {
+       add_theme_support( 'post-thumbnails' );
+
+       // Don't call it after wp_loaded has happened, for tests that manually re-run load actions.
+       if( ! did_action( 'wp_loaded' ) ) {
+               add_theme_support( 'title-tag' );
+       }
+}
+add_action( 'after_setup_theme', 'default_after_setup_theme' );
</ins></span></pre></div>
<a id="trunktestsphpunitdatathemedir1defaultindexphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/themedir1/default/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/themedir1/default/index.php      2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/data/themedir1/default/index.php        2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,3 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// dummy theme
-
-echo dirname(__FILE__).'/'.basename(__FILE__);
-
-?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Empty theme
</ins></span></pre></div>
<a id="trunktestsphpunitincludesbootstrapphp"></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/bootstrap.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/bootstrap.php        2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/includes/bootstrap.php  2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,6 +53,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> $phpmailer = new MockPHPMailer();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Add a symlink to the empty default theme to the themes directory, so it can be used for the tests.
+_symlink_default_theme();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $multisite ) {
</span></span></pre></div>
<a id="trunktestsphpunitincludesfunctionsphp"></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/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/functions.php        2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/includes/functions.php  2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,3 +161,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        return $uploads;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Helper functions to link and unlink the empty default theme into the WordPress install
+ */
+function _symlink_default_theme() {
+       _unlink_default_theme();
+       symlink( DIR_TESTDATA . '/themedir1/default', ABSPATH . '/wp-content/themes/default' );
+}
+
+function _unlink_default_theme() {
+       if ( file_exists( ABSPATH . '/wp-content/themes/default' ) ) {
+               unlink( ABSPATH . '/wp-content/themes/default' );
+       }
+}
+// Only unlink when we're in the main process.
+if ( 'phpunit' === substr( $GLOBALS['argv'][0], -7 ) ) {
+       register_shutdown_function( '_unlink_default_theme' );
+}
</ins></span></pre></div>
<a id="trunktestsphpunittestscustomizecontrolphp"></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/customize/control.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/control.php   2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/control.php     2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,9 +31,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $GLOBALS['wp_customize'] = new WP_Customize_Manager();
</span><span class="cx" style="display: block; padding: 0 10px">                // @codingStandardsIgnoreEnd
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize = $GLOBALS['wp_customize'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizecustomcsssettingphp"></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/customize/custom-css-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/custom-css-setting.php        2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/custom-css-setting.php  2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,9 +36,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize = new WP_Customize_Manager();
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_customize = $this->wp_customize;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 do_action( 'customize_register', $this->wp_customize );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->setting = new WP_Customize_Custom_CSS_Setting( $this->wp_customize, 'custom_css[twentysixteen]' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize->add_setting( $this->setting );
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizemanagerphp"></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/customize/manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/manager.php   2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/manager.php     2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,9 +58,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->manager = $this->instantiate();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->undefined = new stdClass();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizenavmenuitemsettingphp"></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/customize/nav-menu-item-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php     2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php       2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,9 +26,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_customize;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize = new WP_Customize_Manager();
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_customize = $this->wp_customize;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizenavmenusettingphp"></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/customize/nav-menu-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menu-setting.php  2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/nav-menu-setting.php    2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,9 +27,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_customize;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize = new WP_Customize_Manager();
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_customize = $this->wp_customize;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizenavmenusphp"></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/customize/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menus.php 2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/nav-menus.php   2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,9 +26,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_customize;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->wp_customize = new WP_Customize_Manager();
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_customize = $this->wp_customize;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizepartialphp"></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/customize/partial.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/partial.php   2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/partial.php     2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,9 +39,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $this->wp_customize->selective_refresh ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->selective_refresh = $this->wp_customize->selective_refresh;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizeselectiverefreshajaxphp"></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/customize/selective-refresh-ajax.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/selective-refresh-ajax.php    2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/selective-refresh-ajax.php      2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,20 +51,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $this->wp_customize->selective_refresh ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->selective_refresh = $this->wp_customize->selective_refresh;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="cx" style="display: block; padding: 0 10px">         * Do Customizer boot actions.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function do_customize_boot_actions() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Remove actions that call add_theme_support( 'title-tag' ).
-               remove_action( 'after_setup_theme', 'twentyfifteen_setup' );
-               remove_action( 'after_setup_theme', 'twentysixteen_setup' );
-               remove_action( 'after_setup_theme', 'twentyseventeen_setup' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $_SERVER['REQUEST_METHOD'] = 'POST';
</span><span class="cx" style="display: block; padding: 0 10px">                do_action( 'setup_theme' );
</span><span class="cx" style="display: block; padding: 0 10px">                do_action( 'after_setup_theme' );
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizeselectiverefreshphp"></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/customize/selective-refresh.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/selective-refresh.php 2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/selective-refresh.php   2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,9 +39,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $this->wp_customize->selective_refresh ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->selective_refresh = $this->wp_customize->selective_refresh;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Remove default theme actions that interfere with tests
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
</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="trunktestsphpunittestscustomizewidgetsphp"></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/customize/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/widgets.php   2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/customize/widgets.php     2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,13 +40,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 2, $widget_categories );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '', $widget_categories[2]['title'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // @todo We should not be including a theme anyway
-               remove_action( 'after_setup_theme', 'twentyfifteen_setup' );
-               remove_action( 'after_setup_theme', 'twentysixteen_setup' );
-               remove_action( 'customize_register', 'twentysixteen_customize_register', 11 );
-               remove_action( 'after_setup_theme', 'twentyseventeen_setup' );
-               remove_action( 'customize_register', 'twentyseventeen_customize_register' );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->backup_registered_sidebars = $GLOBALS['wp_registered_sidebars'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Reset protected static var on class.
</span></span></pre></div>
<a id="trunktestsphpunittestsmediaphp"></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/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media.php       2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/tests/phpunit/tests/media.php 2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,20 +33,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->img_url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . $this->img_name;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->img_html = '<img src="' . $this->img_url . '"/>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->img_meta = array( 'width' => 100, 'height' => 100, 'sizes' => '' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-               // Disable Twenty Seventeen changes to the image size attribute
-               remove_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr' );
-               remove_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr' );
</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() {
-               parent::tearDown();
-
-               // Reset Twenty Seventeen behaviour
-               add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 );
-               add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         function test_img_caption_shortcode_added() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $shortcode_tags;
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 'img_caption_shortcode', $shortcode_tags['caption'] );
</span></span></pre></div>
<a id="trunkwptestsconfigsamplephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/wp-tests-config-sample.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/wp-tests-config-sample.php  2016-10-21 10:45:21 UTC (rev 38857)
+++ trunk/wp-tests-config-sample.php    2016-10-21 11:02:37 UTC (rev 38858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,6 +3,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
</span><span class="cx" style="display: block; padding: 0 10px"> define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*
+ * Path to the theme to test with.
+ *
+ * The 'default' theme is symlinked from test/phpunit/data/themedir1/default into
+ * the themes directory of the WordPress install defined above.
+ */
+define( 'WP_DEFAULT_THEME', 'default' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Test with multisite enabled.
</span><span class="cx" style="display: block; padding: 0 10px"> // Alternatively, use the tests/phpunit/multisite.xml configuration file.
</span><span class="cx" style="display: block; padding: 0 10px"> // define( 'WP_TESTS_MULTISITE', true );
</span></span></pre>
</div>
</div>

</body>
</html>