<!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>[47013] trunk/tests/phpunit: Tests: Update legacy arguments passed to `WP_UnitTest_Factory_For_Blog::create_object()`.</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 { white-space: pre-line; 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/47013">47013</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/47013","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-12-25 21:39:46 +0000 (Wed, 25 Dec 2019)</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: Update legacy arguments passed to `WP_UnitTest_Factory_For_Blog::create_object()`.
This converts the arguments originally meant for `wpmu_create_blog()` to the ones used by `wp_insert_site()`.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/47011">[47011]</a>.
Fixes <a href="https://core.trac.wordpress.org/ticket/47195">#47195</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludesfactoryclasswpunittestfactoryforblogphp">trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitebootstrapphp">trunk/tests/phpunit/tests/multisite/bootstrap.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitegetIdFromBlognamephp">trunk/tests/phpunit/tests/multisite/getIdFromBlogname.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitegetMainSiteIdphp">trunk/tests/phpunit/tests/multisite/getMainSiteId.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitenetworkphp">trunk/tests/phpunit/tests/multisite/network.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesitephp">trunk/tests/phpunit/tests/multisite/site.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesiteQueryphp">trunk/tests/phpunit/tests/multisite/siteQuery.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitewpGetSitesphp">trunk/tests/phpunit/tests/multisite/wpGetSites.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitewpmuValidateBlogSignupphp">trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitephp">trunk/tests/phpunit/tests/multisite.php</a></li>
<li><a href="#trunktestsphpunittestsoptionmultisitephp">trunk/tests/phpunit/tests/option/multisite.php</a></li>
<li><a href="#trunktestsphpunittestsusergetActiveBlogForUserphp">trunk/tests/phpunit/tests/user/getActiveBlogForUser.php</a></li>
<li><a href="#trunktestsphpunittestsusermultisitephp">trunk/tests/phpunit/tests/user/multisite.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludesfactoryclasswpunittestfactoryforblogphp"></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/factory/class-wp-unittest-factory-for-blog.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,17 +33,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function create_object( $args ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Map some arguments for backward compatibility with wpmu_create_blog() previously used here.
- if ( ! isset( $args['public'] ) ) {
- // Default to public, unless an options array was provided.
- $args['public'] = ! isset( $args['meta'] ) ? 1 : 0;
- }
-
- if ( ! isset( $args['user_id'] ) ) {
- $args['user_id'] = get_current_user_id();
- }
-
- if ( isset( $args['site_id'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Map some arguments for backward compatibility with `wpmu_create_blog()` previously used here.
+ if ( ! isset( $args['network_id'] ) && isset( $args['site_id'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $args['network_id'] = $args['site_id'];
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $args['site_id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitebootstrapphp"></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/multisite/bootstrap.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/bootstrap.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/bootstrap.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,29 +55,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/bar/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/bar/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/bar/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'www.w.org/' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'domain' => 'www.w.org',
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitegetIdFromBlognamephp"></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/multisite/getIdFromBlogname.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/getIdFromBlogname.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/getIdFromBlogname.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,34 +31,34 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'foo.wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'foo.wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'foo.wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'www.wordpress.net/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'www.wordpress.net',
- 'path' => '/',
- 'site_id' => self::$network_ids['www.wordpress.net/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'www.wordpress.net',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['www.wordpress.net/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'foo.wordpress.net/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'foo.wordpress.net',
- 'path' => '/',
- 'site_id' => self::$network_ids['www.wordpress.net/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'foo.wordpress.net',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['www.wordpress.net/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'www.wordpress.net/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'www.wordpress.net',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['www.wordpress.net/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'www.wordpress.net',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['www.wordpress.net/'],
</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></pre></div>
<a id="trunktestsphpunittestsmultisitegetMainSiteIdphp"></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/multisite/getMainSiteId.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/getMainSiteId.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/getMainSiteId.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,14 +35,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => '/',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</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></pre></div>
<a id="trunktestsphpunittestsmultisitenetworkphp"></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/multisite/network.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/network.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/network.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,19 +38,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $sites = array(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/',
- 'site_id' => self::$different_network_id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$different_network_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$different_network_id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$different_network_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/bar/',
- 'site_id' => self::$different_network_id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/bar/',
+ 'network_id' => self::$different_network_id,
</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></pre></div>
<a id="trunktestsphpunittestsmultisitesitephp"></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/multisite/site.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/site.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/site.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,14 +44,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</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">@@ -63,9 +63,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_action( 'wp_initialize_site', 'wp_initialize_site', 10 );
</span><span class="cx" style="display: block; padding: 0 10px"> self::$uninitialized_site_id = wp_insert_site(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'uninitialized.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'uninitialized.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</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"> add_action( 'wp_initialize_site', 'wp_initialize_site', 10, 2 );
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitesiteQueryphp"></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/multisite/siteQuery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/siteQuery.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/siteQuery.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,29 +49,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wordpress.org/foo/bar/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wordpress.org',
- 'path' => '/foo/bar/',
- 'site_id' => self::$network_ids['wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wordpress.org',
+ 'path' => '/foo/bar/',
+ 'network_id' => self::$network_ids['wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'make.wordpress.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'make.wordpress.org',
- 'path' => '/foo/',
- 'site_id' => self::$network_ids['make.wordpress.org/'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'make.wordpress.org',
+ 'path' => '/foo/',
+ 'network_id' => self::$network_ids['make.wordpress.org/'],
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'www.w.org/' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'domain' => 'www.w.org',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -86,12 +86,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => '/foo/bar/',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'www.w.org/make/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'www.w.org',
- 'path' => '/make/',
- 'meta' => array(
- 'public' => 1,
- 'lang_id' => 1,
- ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'www.w.org',
+ 'path' => '/make/',
+ 'public' => 1,
+ 'lang_id' => 1,
</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></pre></div>
<a id="trunktestsphpunittestsmultisitewpGetSitesphp"></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/multisite/wpGetSites.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/wpGetSites.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/wpGetSites.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,21 +13,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpSetUpBeforeClass( $factory ) {
</span><span class="cx" style="display: block; padding: 0 10px"> self::$site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'w.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'w.org',
- 'path' => '/',
- 'site_id' => 2,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'w.org',
+ 'path' => '/',
+ 'network_id' => 2,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp.org/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wp.org',
- 'path' => '/',
- 'site_id' => 2,
- 'meta' => array( 'public' => 0 ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wp.org',
+ 'path' => '/',
+ 'network_id' => 2,
+ 'public' => 0,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp.org/foo/' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => 'wp.org',
- 'path' => '/foo/',
- 'site_id' => 1,
- 'meta' => array( 'public' => 0 ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => 'wp.org',
+ 'path' => '/foo/',
+ 'network_id' => 1,
+ 'public' => 0,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp.org/oof/' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'domain' => 'wp.org',
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitewpmuValidateBlogSignupphp"></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/multisite/wpmuValidateBlogSignup.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,9 +34,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$existing_blog_id = $factory->blog->create(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'domain' => $domain,
- 'path' => $path,
- 'site_id' => $network->id,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'domain' => $domain,
+ 'path' => $path,
+ 'network_id' => $network->id,
</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></pre></div>
<a id="trunktestsphpunittestsmultisitephp"></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/multisite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/multisite.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,23 +43,37 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $site_ids = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'public' => self::factory()->blog->create_many(
</span><span class="cx" style="display: block; padding: 0 10px"> random_int( 0, 5 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- array( 'meta' => array( 'public' => 1 ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ array(
+ 'public' => 1,
+ )
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'archived' => self::factory()->blog->create_many(
</span><span class="cx" style="display: block; padding: 0 10px"> random_int( 0, 5 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- array( 'meta' => array( 'archived' => 1 ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ array(
+ 'public' => 0,
+ 'archived' => 1,
+ )
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'mature' => self::factory()->blog->create_many(
</span><span class="cx" style="display: block; padding: 0 10px"> random_int( 0, 5 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- array( 'meta' => array( 'mature' => 1 ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ array(
+ 'public' => 0,
+ 'mature' => 1,
+ )
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'spam' => self::factory()->blog->create_many(
</span><span class="cx" style="display: block; padding: 0 10px"> random_int( 0, 5 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- array( 'meta' => array( 'spam' => 1 ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ array(
+ 'public' => 0,
+ 'spam' => 1,
+ )
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'deleted' => self::factory()->blog->create_many(
</span><span class="cx" style="display: block; padding: 0 10px"> random_int( 0, 5 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- array( 'meta' => array( 'deleted' => 1 ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ array(
+ 'public' => 0,
+ 'deleted' => 1,
+ )
</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></pre></div>
<a id="trunktestsphpunittestsoptionmultisitephp"></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/option/multisite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/option/multisite.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/option/multisite.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -104,9 +104,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $blog_id = self::factory()->blog->create(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'user_id' => $user_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'meta' => array(
- 'public' => 1,
- ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'public' => 1,
</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"> $this->assertInternalType( 'integer', $blog_id );
</span></span></pre></div>
<a id="trunktestsphpunittestsusergetActiveBlogForUserphp"></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/getActiveBlogForUser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/getActiveBlogForUser.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/user/getActiveBlogForUser.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $site_id = self::factory()->blog->create(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'user_id' => self::$user_id,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'meta' => array( 'spam' => 1 ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'spam' => 1,
</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></pre></div>
<a id="trunktestsphpunittestsusermultisitephp"></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/multisite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/multisite.php 2019-12-25 18:15:13 UTC (rev 47012)
+++ trunk/tests/phpunit/tests/user/multisite.php 2019-12-25 21:39:46 UTC (rev 47013)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -122,15 +122,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( is_blog_user() );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( is_blog_user( get_current_blog_id() ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $blog_ids = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $blog_id = self::factory()->blog->create( array( 'user_id' => get_current_user_id() ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $blog_ids = self::factory()->blog->create_many( 1 );
- foreach ( $blog_ids as $blog_id ) {
- $this->assertInternalType( 'int', $blog_id );
- $this->assertTrue( is_blog_user( $blog_id ) );
- $this->assertTrue( remove_user_from_blog( $user1_id, $blog_id ) );
- $this->assertFalse( is_blog_user( $blog_id ) );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertInternalType( 'int', $blog_id );
+ $this->assertTrue( is_blog_user( $blog_id ) );
+ $this->assertTrue( remove_user_from_blog( $user1_id, $blog_id ) );
+ $this->assertFalse( is_blog_user( $blog_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( $old_current );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -157,35 +154,34 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( is_user_member_of_blog( $user1_id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( is_user_member_of_blog( $user1_id, $site_id ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $blog_ids = self::factory()->blog->create_many( 1 );
- foreach ( $blog_ids as $blog_id ) {
- $this->assertInternalType( 'int', $blog_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $blog_id = self::factory()->blog->create( array( 'user_id' => get_current_user_id() ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Current user gets added to new blogs
- $this->assertTrue( is_user_member_of_blog( $user1_id, $blog_id ) );
- // Other users should not
- $this->assertFalse( is_user_member_of_blog( $user2_id, $blog_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertInternalType( 'int', $blog_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- switch_to_blog( $blog_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Current user gets added to new blogs
+ $this->assertTrue( is_user_member_of_blog( $user1_id, $blog_id ) );
+ // Other users should not
+ $this->assertFalse( is_user_member_of_blog( $user2_id, $blog_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertTrue( is_user_member_of_blog( $user1_id ) );
- $this->assertFalse( is_user_member_of_blog( $user2_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ switch_to_blog( $blog_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Remove user 1 from blog
- $this->assertTrue( remove_user_from_blog( $user1_id, $blog_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertTrue( is_user_member_of_blog( $user1_id ) );
+ $this->assertFalse( is_user_member_of_blog( $user2_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Add user 2 to blog
- $this->assertTrue( add_user_to_blog( $blog_id, $user2_id, 'subscriber' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Remove user 1 from blog
+ $this->assertTrue( remove_user_from_blog( $user1_id, $blog_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertFalse( is_user_member_of_blog( $user1_id ) );
- $this->assertTrue( is_user_member_of_blog( $user2_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Add user 2 to blog
+ $this->assertTrue( add_user_to_blog( $blog_id, $user2_id, 'subscriber' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- restore_current_blog();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertFalse( is_user_member_of_blog( $user1_id ) );
+ $this->assertTrue( is_user_member_of_blog( $user2_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertFalse( is_user_member_of_blog( $user1_id, $blog_id ) );
- $this->assertTrue( is_user_member_of_blog( $user2_id, $blog_id ) );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ restore_current_blog();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertFalse( is_user_member_of_blog( $user1_id, $blog_id ) );
+ $this->assertTrue( is_user_member_of_blog( $user2_id, $blog_id ) );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> wpmu_delete_user( $user1_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $user = new WP_User( $user1_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $user->exists() );
</span></span></pre>
</div>
</div>
</body>
</html>