Wordpress/tests/phpunit/tests
Felix Arntz c29d019762 Multisite: Complete the new CRUD API for managing sites.
New functions `wp_insert_site( $data )`, `wp_update_site( $id, $data )` and `wp_delete_site( $id )` are introduced to manage site rows in the `wp_blogs` table, forming the new CRUD API together with the existing `get_site()` / `get_sites()`. The new API provides various benefits over the previously existing API, fixing several cache invalidation issues and being hook-driven so that normalization and validation of the passed data can be fully customized.

New hooks introduced as part of this are the actions `wp_insert_site`, `wp_update_site`, `wp_delete_site`, `wp_validate_site_data` and the filter `wp_normalize_site_data`.

At this point, `wp_insert_site()` does not handle setting up the site's database tables, and `wp_delete_site()` does not handle dropping the site's database tables, so the two can not yet be used directly as full replacements of `wpmu_create_blog()` and `wpmu_delete_blog()`. Managing the site's database tables will be added via hooks as part of the follow-up ticket #41333.

The existing functions `wpmu_create_blog()`, `update_blog_details()`, and `wpmu_delete_blog()` make use of the respective new counterpart and will be obsolete once #41333 has been completed.

Props flixos90, jeremyfelt, spacedmonkey.
Fixes #40364.


git-svn-id: https://develop.svn.wordpress.org/trunk@43548 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-01 13:05:44 +00:00
..
actions Code is Poetry. 2017-11-30 23:09:33 +00:00
admin Docs: Update @since versions in Community Events class added in [42726]. 2018-06-16 10:38:27 +00:00
ajax Build/Test Tools: Implement assertNotWPError() in appropriate places in the test suite. 2018-03-20 22:34:11 +00:00
attachment Code is Poetry. 2017-11-30 23:09:33 +00:00
bookmark Code is Poetry. 2017-11-30 23:09:33 +00:00
canonical Code is Poetry. 2017-11-30 23:09:33 +00:00
category category_description() should be taxonomy-agnostic. 2017-12-04 21:48:24 +00:00
comment Privacy: Revert [43525]. 2018-07-24 17:05:56 +00:00
customize Customize: Do not attempt to count uncountable value. 2018-07-17 14:37:21 +00:00
date Date/Time: Add support for the c and r shorthand formats in date_i18n(). 2018-07-05 23:10:01 +00:00
db Code is Poetry. 2017-11-30 23:09:33 +00:00
dependencies External Libraries: Test for MEjs files in src instead of build. 2018-02-28 00:25:08 +00:00
editor Code is Poetry. 2017-11-30 23:09:33 +00:00
external-http Embeds: Remove the external oEmbed tests for YouTube. 2017-10-03 16:51:25 +00:00
feed Code is Poetry. 2017-11-30 23:09:33 +00:00
filesystem Code is Poetry. 2017-11-30 23:09:33 +00:00
formatting Emoji: Update Twemoji to version 11.0. 2018-06-20 04:20:32 +00:00
functions Privacy: Fix tests after [43467]. 2018-07-17 09:57:57 +00:00
general General: Introduce WP_Error::has_errors() method and use it where appropriate. 2018-02-27 02:30:46 +00:00
hooks Code is Poetry. 2017-11-30 23:09:33 +00:00
http Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method. 2018-07-19 19:52:41 +00:00
image Build/Test Tools: Implement assertNotWPError() in appropriate places in the test suite. 2018-03-20 22:34:11 +00:00
import Code is Poetry. 2017-11-30 23:09:33 +00:00
includes Code is Poetry. 2017-11-30 23:09:33 +00:00
l10n Code is Poetry. 2017-11-30 23:09:33 +00:00
link Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link(). 2018-07-18 11:49:46 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Code is Poetry. 2017-11-30 23:09:33 +00:00
menu Tests: Correct erroneous @covers and @use tags. 2018-02-01 16:08:04 +00:00
meta REST API: Support meta registration for specific object subtypes. 2018-06-21 21:06:50 +00:00
multisite Multisite: Complete the new CRUD API for managing sites. 2018-08-01 13:05:44 +00:00
oembed Tests: Replace use of $this->server with rest_get_server() for better memory recycling. 2018-02-21 16:24:30 +00:00
option Multisite: Add missing group annotations to tests included in [42833]. 2018-03-13 17:56:05 +00:00
pomo Code is Poetry. 2017-11-30 23:09:33 +00:00
post REST API: Support meta registration for specific object subtypes. 2018-06-21 21:06:50 +00:00
privacy Privacy: Add unit tests for _wp_privacy_send_request_confirmation_notification(), introduced in [43211]. 2018-07-17 22:55:51 +00:00
query Allow LIKE queries against the 'key' value in meta queries. 2018-03-01 04:02:41 +00:00
rest-api REST API: Ensure attachments created with WP_REST_Attachments_Controller::create_item() on Windows have a relative path. 2018-07-24 16:51:09 +00:00
rewrite Tests: Improve the old date redirect tests. 2018-01-24 06:38:58 +00:00
taxonomy Taxonomy: Introduce is_taxonomy_viewable(). 2018-07-03 10:28:39 +00:00
term REST API: Support meta registration for specific object subtypes. 2018-06-21 21:06:50 +00:00
theme Themes: Revert [42788] as it breaks a lot of things. 2018-03-09 16:59:57 +00:00
url Privacy: Add template tags for building link to privacy policy page. 2018-04-25 15:54:29 +00:00
user Role/Capability: Rename upgrade_php capability to more suitable update_php. 2018-06-26 15:04:26 +00:00
widgets Widgets: Fix Text widget unit test which broke due to global scope not being cleaned. 2018-01-30 00:33:03 +00:00
xmlrpc Code is Poetry. 2017-11-30 23:09:33 +00:00
actions.php Code is Poetry. 2017-11-30 23:09:33 +00:00
adminbar.php Code is Poetry. 2017-11-30 23:09:33 +00:00
auth.php Code is Poetry. 2017-11-30 23:09:33 +00:00
avatar.php Code is Poetry. 2017-11-30 23:09:33 +00:00
basic.php Build/Test tools: Remove unnecessary PHP functionality tests from the test suite. 2017-12-09 23:08:24 +00:00
cache.php Code is Poetry. 2017-11-30 23:09:33 +00:00
canonical.php Code is Poetry. 2017-11-30 23:09:33 +00:00
category.php Code is Poetry. 2017-11-30 23:09:33 +00:00
comment-submission.php Code is Poetry. 2017-11-30 23:09:33 +00:00
comment.php Privacy: Don't replace comment author URL and email with anything. 2018-07-17 08:59:30 +00:00
compat.php General: Skip test_is_countable_ResourceBundle() on PHP 5.3 and below. 2018-05-10 20:15:18 +00:00
cron.php Cron: Add hooks and a function to allow hijacking cron implementation. 2018-07-27 02:22:50 +00:00
db.php I18N: Introduce unit tests for the Japanese language in order to facilitate future improvements. 2018-06-16 12:44:46 +00:00
dbdelta.php Code is Poetry. 2017-11-30 23:09:33 +00:00
dependencies.php Code is Poetry. 2017-11-30 23:09:33 +00:00
file.php Code is Poetry. 2017-11-30 23:09:33 +00:00
filters.php Code is Poetry. 2017-11-30 23:09:33 +00:00
functions.php Filesystem API: Skip https:// test for wp_is_stream() if openssl extension is not loaded. 2018-07-18 09:51:53 +00:00
kses.php Formatting: Permit use of text-transform in safecss_filter_attr(). 2018-03-27 00:53:20 +00:00
l10n.php I18N: Introduce unit tests for the Japanese language in order to facilitate future improvements. 2018-06-16 12:44:46 +00:00
link.php Code is Poetry. 2017-11-30 23:09:33 +00:00
locale.php Code is Poetry. 2017-11-30 23:09:33 +00:00
mail.php Code is Poetry. 2017-11-30 23:09:33 +00:00
media.php Revert max-width styles on caption shortcodes. 2018-03-16 20:06:41 +00:00
meta.php Code is Poetry. 2017-11-30 23:09:33 +00:00
multisite.php Code is Poetry. 2017-11-30 23:09:33 +00:00
pluggable.php Canonical: Add $x_redirect_by parameter to wp_safe_redirect(). 2018-02-04 16:04:10 +00:00
post.php Code is Poetry. 2017-11-30 23:09:33 +00:00
query.php Code is Poetry. 2017-11-30 23:09:33 +00:00
rest-api.php Code is Poetry. 2017-11-30 23:09:33 +00:00
rewrite.php Code is Poetry. 2017-11-30 23:09:33 +00:00
shortcode.php Revert max-width styles on caption shortcodes. 2018-03-16 20:06:41 +00:00
taxonomy.php Build/Test tools: Switch to PHPUnit's expectOutputString() method instead of manually using output buffers for output assertions. 2017-12-10 00:30:32 +00:00
template.php Code is Poetry. 2017-11-30 23:09:33 +00:00
term.php Code is Poetry. 2017-11-30 23:09:33 +00:00
theme.php Tests: Correct erroneous @covers and @use tags. 2018-02-01 16:08:04 +00:00
upload.php Code is Poetry. 2017-11-30 23:09:33 +00:00
url.php Code is Poetry. 2017-11-30 23:09:33 +00:00
user.php Tests: Fix failing test after [43388]. 2018-07-05 08:52:06 +00:00
walker.php Code is Poetry. 2017-11-30 23:09:33 +00:00
widgets.php Tests: Correct erroneous @covers and @use tags. 2018-02-01 16:08:04 +00:00
wp.php Query: Add a WP::remove_query_var() helper function. 2016-01-05 20:56:10 +00:00