<!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>[47012] trunk/tests/phpunit/tests: Tests: Replace most instances of `wpmu_delete_blog()` not specifically testing that function with `wp_delete_site()`.</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/47012">47012</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/47012","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 18:15:13 +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: Replace most instances of `wpmu_delete_blog()` not specifically testing that function with `wp_delete_site()`.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/47011">[47011]</a>.
See <a href="https://core.trac.wordpress.org/ticket/47195">#47195</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestslinkgetDashboardUrlphp">trunk/tests/phpunit/tests/link/getDashboardUrl.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitebootstrapphp">trunk/tests/phpunit/tests/multisite/bootstrap.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitegetBlogDetailsphp">trunk/tests/phpunit/tests/multisite/getBlogDetails.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="#trunktestsphpunittestsmultisitegetSitephp">trunk/tests/phpunit/tests/multisite/getSite.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="#trunktestsphpunittestsmultisitesiteDetailsphp">trunk/tests/phpunit/tests/multisite/siteDetails.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesiteMetaphp">trunk/tests/phpunit/tests/multisite/siteMeta.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="#trunktestsphpunittestsmultisitewpInstallDefaultsphp">trunk/tests/phpunit/tests/multisite/wpInstallDefaults.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitewpMSSitesListTablephp">trunk/tests/phpunit/tests/multisite/wpMSSitesListTable.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitewpmuValidateBlogSignupphp">trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestuserscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-users-controller.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="trunktestsphpunittestslinkgetDashboardUrlphp"></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/getDashboardUrl.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/link/getDashboardUrl.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/link/getDashboardUrl.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,7 +68,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_user_from_blog( self::$user_id, $site_id );
</span><span class="cx" style="display: block; padding: 0 10px"> add_user_to_blog( get_current_blog_id(), self::$user_id, 'administrator' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $expected, $result );
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/bootstrap.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> foreach ( self::$network_ids as $id ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitegetBlogDetailsphp"></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/getBlogDetails.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/getBlogDetails.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/getBlogDetails.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,7 +35,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> wp_update_network_site_counts();
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/getIdFromBlogname.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,7 +72,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> foreach ( self::$network_ids as $id ) {
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/getMainSiteId.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +54,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> global $wpdb;
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitegetSitephp"></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/getSite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/getSite.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/getSite.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,7 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> wp_update_network_site_counts();
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/network.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,7 +63,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$different_site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->sitemeta} WHERE site_id = %d", self::$different_network_id ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -155,7 +155,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $actual = (int) get_blog_count(); // Count only updated when cron runs, so should be unchanged.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $site_ids as $site_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_network_counts();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -175,7 +175,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'enable_live_network_counts', '__return_false' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $site_ids as $site_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_network_counts();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,7 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'enable_live_network_counts', '__return_true' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $site_ids as $site_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_network_counts();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -590,13 +590,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wpmu_create_blog_updates_correct_network_site_count() {
</span><span class="cx" style="display: block; padding: 0 10px"> $original_count = get_blog_count( self::$different_network_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">- $site_id = self::factory()->blog->create(
- array(
- 'domain' => 'example.org',
- 'path' => '/',
- 'site_id' => self::$different_network_id,
- )
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $site_id = wpmu_create_blog( 'example.org', '/', '', 1, array(), self::$different_network_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = get_blog_count( self::$different_network_id );
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/site.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,7 +79,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_uninitialize_site', 'wp_uninitialize_site', 10, 1 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> foreach ( self::$network_ids as $id ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitesiteDetailsphp"></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/siteDetails.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/siteDetails.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/siteDetails.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,7 +139,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $cached_details = wp_cache_get( $site->id, 'site-details' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_update_network_site_counts();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotFalse( $cached_details );
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitesiteMetaphp"></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/siteMeta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/siteMeta.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/siteMeta.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,8 +41,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> delete_network_option( get_main_network_id(), 'site_meta_supported' );
</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">- wpmu_delete_blog( self::$site_id, true );
- wpmu_delete_blog( self::$site_id2, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( self::$site_id );
+ wp_delete_site( self::$site_id2 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_network_site_counts();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,7 +213,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'bar', get_site_meta( $site_id, 'foo', true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'bar', get_site_meta( $site_id, 'foo1', true ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '', get_site_meta( $site_id, 'foo', true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '', get_site_meta( $site_id, 'foo1', true ) );
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/siteQuery.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> foreach ( self::$network_ids as $id ) {
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/wpGetSites.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,7 +43,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $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"> wp_update_network_site_counts();
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitewpInstallDefaultsphp"></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/wpInstallDefaults.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/wpInstallDefaults.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/wpInstallDefaults.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,8 +21,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $first_comment = get_comments();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $blog_id, true );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $blog_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $first_page->post_content );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $first_comment[0]->comment_content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,8 +47,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $first_comment = get_comments();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $blog_id, true );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $blog_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $first_page->post_content );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotEmpty( $first_comment[0]->comment_content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,8 +73,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $first_comment = get_comments();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $blog_id, true );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $blog_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'Some page content', $first_page->post_content );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( 'Some comment content', $first_comment[0]->comment_content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitewpMSSitesListTablephp"></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/wpMSSitesListTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/wpMSSitesListTable.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/wpMSSitesListTable.php 2019-12-25 18:15:13 UTC (rev 47012)
</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">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$site_ids as $site_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_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="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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wpmu_delete_user( self::$existing_user_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">- wpmu_delete_blog( self::$existing_blog_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( self::$existing_blog_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="trunktestsphpunittestsrestapirestuserscontrollerphp"></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/rest-api/rest-users-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-users-controller.php 2019-12-25 18:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/rest-api/rest-users-controller.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,7 +136,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _unregister_post_type( 'r_false_p_false' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( self::$site, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( self::$site );
</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"> // Remove users for pagination tests.
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/user/getActiveBlogForUser.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,8 +51,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = get_active_blog_for_user( self::$user_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">- wpmu_delete_blog( $site_id_one, true );
- wpmu_delete_blog( $site_id_two, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id_one );
+ wp_delete_site( $site_id_two );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $primary_site_id, $result->id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,7 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = get_active_blog_for_user( self::$user_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">- wpmu_delete_blog( $primary_site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $primary_site_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $primary_site_id, $result->id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,7 +92,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = get_active_blog_for_user( self::$user_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">- wpmu_delete_blog( $site_id, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEquals( $current_site_id, $result->id );
</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:10:19 UTC (rev 47011)
+++ trunk/tests/phpunit/tests/user/multisite.php 2019-12-25 18:15:13 UTC (rev 47012)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -389,7 +389,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_user_by( 'id', $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> wpmu_delete_user( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertContains( 'subscriber', $user->roles );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -402,8 +402,9 @@
</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">
</span><span class="cx" style="display: block; padding: 0 10px"> $result = add_user_to_blog( 73622, $site_id, 'subscriber' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wpmu_delete_blog( $site_id );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_delete_site( $site_id );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertWPError( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>