wordpress-develop/tests/phpunit/tests
Boone Gorges 4ec5d65dcc Introduce meta_box_sanitize_cb taxonomy argument.
The `meta_box_cb` argument was introduced in [25572] to allow plugin
authors to provide a custom callback for rendering their taxonomy's meta
box on the post edit screen. However, the routine used to handle the saving
of these custom taxonomy meta boxes was not customizable, but was instead
based simply on whether the taxonomy was hierarchicaly. See [13535].

The new `meta_box_sanitize_cb` argument defaults to the "tag" routine for
non-hierarchical taxonomies and the "category" routine for hierarchical ones,
thereby maintaining the current default behavior. Developers can override this
when the data passed from their `meta_box_cb` differs.

Props boonebgorges, ZaneMatthew, stephenharris.
Fixes #36514.

git-svn-id: https://develop.svn.wordpress.org/trunk@42211 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-21 03:14:52 +00:00
..
actions Build/Test Tools: Continue eliminating randomness in tests. 2016-10-09 01:29:04 +00:00
admin Dashboard: Strip ports from IPs to avoid PHP warnings. 2017-10-25 00:06:06 +00:00
ajax Bundled Themes: Fix fragile update-theme phpunit test which broke after version updates in [42105]. 2017-11-02 01:25:57 +00:00
attachment Unit Tests: WP_UnitTest_Generator_Sequence needs a static incrementer - otherwise, it assumes every test class is a reset, which it no longer is (it is now static). 2015-10-17 19:24:20 +00:00
bookmark In get_bookmarks(), don't cache if 'orderby=rand'. 2016-05-25 18:29:01 +00:00
canonical Canonical: Strip trailing punctuation from permalinks. 2017-10-24 14:17:22 +00:00
category Taxonomy: Introduce get_term_parents_list(). 2016-12-09 16:09:31 +00:00
comment Database: Restore numbered placeholders in wpdb::prepare(). 2017-10-31 11:59:43 +00:00
customize Customize: Move control's fallback selection of default content template to renderContent method to align with sections and panels. 2017-10-19 03:03:19 +00:00
date Database: Restore numbered placeholders in wpdb::prepare(). 2017-10-31 11:59:43 +00:00
db Tests: Restore the database connection earlier when switching test groups. 2016-12-21 04:58:47 +00:00
dependencies Code Editor: Fix phpunit tests related to gutters after [41974]. 2017-10-24 16:57:10 +00:00
editor Editor: In _WP_Editors::wp_link_query, allow filtering empty results. 2017-09-08 14:02:43 +00:00
external-http Embeds: Remove the external oEmbed tests for YouTube. 2017-10-03 16:51:25 +00:00
feed Build/Test Tools: Remove ancient UT ticket handling. 2017-04-22 19:38:42 +00:00
filesystem General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
formatting Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions. 2017-10-18 19:41:46 +00:00
functions Remove the svn:executable property from files that don't need it. 2017-11-17 02:57:27 +00:00
general Allow usage of aria-current in paginate_links(). 2017-09-11 14:28:59 +00:00
hooks Remove the svn:executable property from files that don't need it. 2017-11-17 02:57:27 +00:00
http Build/Test Tools: Convert more test skipping into hard failures. 2017-09-11 00:37:55 +00:00
image Build/Test Tools: Revert [41784]. 2017-10-12 04:27:22 +00:00
import Build/Test Tools: Clarify the error message when running the test suite without the WordPress Importer plugin present in the test suite. 2017-07-27 14:00:16 +00:00
includes Tests: Reset post-related globals after each test. 2016-09-30 03:15:36 +00:00
l10n Build/Test Tools: Automatically skip tests in the ms-required and ms-excluded groups. 2017-05-01 20:34:10 +00:00
link Multisite: Introduce a self_admin_url filter to adjust the URL to an administration panel. 2017-07-14 23:00:55 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Revert [40842] due to failing tests. 2017-05-25 18:27:08 +00:00
menu Menus: Add menu-$i slugs to mapping groups 2017-10-25 22:28:43 +00:00
meta Unit Tests: 2016-08-27 08:35:16 +00:00
multisite Remove the svn:executable property from files that don't need it. 2017-11-17 02:57:27 +00:00
oembed Embeds: Improve consistency of update and refresh logic for oEmbed caching between oembed_cache and post meta. 2017-10-24 23:09:43 +00:00
option Settings: Replace count() call with empty() in get_settings_errors() to prevent PHP 7.2 warnings when $wp_settings_errors is null. 2017-11-10 22:29:45 +00:00
pomo I18N: Improvements to the tests for plural forms. 2017-10-04 13:26:15 +00:00
post Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled. 2017-10-17 20:14:56 +00:00
query Introduce $comment_count param for WP_Query. 2017-07-01 11:24:26 +00:00
rest-api REST API: Add permalink_structure to the index endpoint. 2017-11-10 06:10:23 +00:00
rewrite Tests: Restore the database connection earlier when switching test groups. 2016-12-21 04:58:47 +00:00
taxonomy Allow attachment taxonomies to be fetched as objects. 2016-08-20 17:34:13 +00:00
term Improve data types returned from empty hierarchical term queries. 2017-11-20 22:45:29 +00:00
theme Themes: Adjust unit test after [41607]. 2017-09-27 08:52:34 +00:00
user Multisite: Use get_current_blog_id() instead of $wpdb->blogid. 2017-10-02 01:43:48 +00:00
widgets Widgets: Prevent showing underlying attachment excerpt as caption when empty caption value is supplied in Image widget. 2017-10-27 05:04:04 +00:00
xmlrpc Quick/Bulk Edit: Improve the inline error messages styling. 2017-10-02 21:51:09 +00:00
actions.php Build/Test Tools: Continue eliminating randomness in tests. 2016-10-09 01:29:04 +00:00
adminbar.php Users: Correct a permission check when showing the User item in the + New admin toolbar menu. 2017-05-07 17:41:24 +00:00
auth.php Build/Test Tools: Add an extra WP_Error assertion when testing a valid user activation key. This provides a better failure message if the assertion does fail. 2016-11-27 01:24:58 +00:00
avatar.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
basic.php Build/Test: Revert that failing test. 2017-05-11 00:15:05 +00:00
cache.php Multisite: Remove unused site-lookup global cache group. 2017-03-28 21:07:22 +00:00
canonical.php Unit Tests: 2016-08-27 08:35:16 +00:00
category.php Move wp_dropdown_categories() tests into their own file. 2016-05-19 02:22:59 +00:00
comment-submission.php Posts, Post Types: Correct test_submitting_comment_to_trashed_post_returns_error(). 2017-09-29 15:09:39 +00:00
comment.php Allow metadata to be updated via wp_update_comment(). 2017-07-01 13:35:38 +00:00
compat.php WPDB: When checking that a string can be sent to MySQL, we shouldn't use mb_convert_encoding(), as it behaves differently to MySQL's character encoding conversion. 2015-05-06 02:59:50 +00:00
cron.php Cron API: Introduce wp_unschedule_hook() to clear all events attached to a hook. 2017-06-30 00:21:49 +00:00
db.php Database: Restore numbered placeholders in wpdb::prepare(). 2017-10-31 11:59:43 +00:00
dbdelta.php Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2. 2017-10-10 23:45:35 +00:00
dependencies.php Remove tests for code still in development, see #22229. If accidentally run, they produce fatal errors. 2013-10-07 14:17:13 +00:00
file.php Build/Test Tools: Begin eliminating unnecessary randomness in tests. 2016-10-09 01:11:14 +00:00
filters.php Plugins: Add a current_priority() method to WP_Hook. 2016-12-02 07:09:33 +00:00
functions.php Filesystem API: Add more specificity to the rules for valid files in validate_file(). 2017-10-24 23:14:33 +00:00
kses.php KSES: Support 'tag' => true as a shorthand for 'tag' => array() in wp_kses_attr(). 2017-05-11 19:22:17 +00:00
l10n.php I18N: In wp_dropdown_languages() rename the new show_site_locale_default argument to show_option_site_default. 2016-11-21 16:14:01 +00:00
link.php Move get_adjacent_post() tests to their own file. 2015-12-23 19:38:29 +00:00
locale.php I18N: Introduce a locale-switching function. 2016-10-26 15:35:58 +00:00
mail.php Mail: Set a better error code when triggering wp_mail_failed. 2016-11-02 04:26:18 +00:00
media.php Media: Don't backdate media uploaded to pages. 2017-10-21 13:26:24 +00:00
meta.php Build/Test Tools: Begin eliminating unnecessary randomness in tests. 2016-10-09 01:11:14 +00:00
multisite.php Initialise $_SERVER[ 'REMOTE_ADDR' ] during the test bootstrap so individual tests need not. 2015-09-15 08:04:33 +00:00
pluggable.php Build/Test tools: Update some test cases in anticipation of code formatting corrections. 2017-09-28 22:55:54 +00:00
post.php Widgets: Remove the title attributes used in the Tag cloud widget. 2017-05-22 20:23:49 +00:00
query.php Built/Test Tools: Unify the way the permastructure is set when used in conjunction with re-registering the initial taxonomies. This ensure that rewrite rules for taxonomies are consistently available. 2016-09-26 17:01:48 +00:00
rest-api.php REST API: Add _fields parameter to selectively include fields in response JSON. 2017-10-04 18:44:41 +00:00
rewrite.php Rewrite: In url_to_postid(), bail early if the URL does not belong to the site. 2017-10-06 23:28:38 +00:00
shortcode.php Media: Use max-width for default captions. 2017-10-04 02:49:19 +00:00
taxonomy.php Introduce meta_box_sanitize_cb taxonomy argument. 2017-11-21 03:14:52 +00:00
template.php Posts, Post Types: Revert [40558] pending investigation. 2017-04-30 11:18:43 +00:00
term.php Unit Tests: 2016-08-27 08:35:16 +00:00
theme.php Customize: Remove incorrect test assertions for the post_date of customization drafts. 2017-10-18 02:40:27 +00:00
upload.php Build/Test Tools: Remove ancient UT ticket handling. 2017-04-22 19:38:42 +00:00
url.php Refactor some janky URL tests into data providers for clarity and better error reporting. 2016-02-26 02:10:32 +00:00
user.php Multisite: Initialize a user's roles correctly when setting them up for a different site. 2017-09-27 21:09:11 +00:00
walker.php Add unit tests for Walker class. 2014-08-01 20:35:25 +00:00
widgets.php Widgets: Revert format of sidebars_widgets. 2017-10-02 18:10:06 +00:00
wp.php Query: Add a WP::remove_query_var() helper function. 2016-01-05 20:56:10 +00:00