wordpress-develop/tests/phpunit/tests
Joe Hoyle 433b4fbfba REST API: Enable sanitize_callback to return WP_Error.
Give developers the opportunity to reject incoming data without using the validation callback. It also enables us to do sanitization and validation in one function in instances where this could be useful.

Props websupporter, rmccue.
Fixes #37560.


git-svn-id: https://develop.svn.wordpress.org/trunk@38601 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 15:49:37 +00:00
..
actions Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
admin Permalinks: Ensure Pending Review Posts permalink posts link to the draft 2016-09-08 04:04:22 +00:00
ajax Customize: Allow users to more seamlessly create page-based nav menus during customization. 2016-08-29 22:58:32 +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 Unit Tests: 2016-08-27 08:35:16 +00:00
category Introduce required argument for wp_dropdown_categories(). 2016-05-19 02:38:33 +00:00
comment Comments: Don't do direct SQL query when fetching decendants. 2016-08-30 14:48:00 +00:00
customize Customize: Fix php warning due to WP_Customize_Manager::prepare_setting_validity_for_js() incorrectly assuming that WP_Error will only ever have arrays in its $error_data. 2016-09-02 22:34:48 +00:00
date 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
db Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate. 2016-08-26 20:21:30 +00:00
dependencies External Libraries: Update Backbone to version 1.3.3. 2016-06-16 09:26:06 +00:00
external-http Unit Tests: move some oEmbed tests that can trigger HTTP calls to Tests_External_HTTP_OEmbed. 2015-10-15 01:28:05 +00:00
feed Unit Tests: 2016-08-27 08:35:16 +00:00
filesystem Require dependencies when appropriate in some unit test files. 2015-07-14 03:07:13 +00:00
formatting Formatting: Add an extra line break before block elements in wpautop(). 2016-09-12 07:05:28 +00:00
functions Unit Tests: 2016-08-27 08:35:16 +00:00
general Script Loader: Properly adjust tests missed in [38443]. 2016-08-30 14:50:14 +00:00
hooks Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. 2016-09-08 03:54:13 +00:00
http HTTP API: Revert changes to wp_parse_url() while PHP 5.2 errors are investigated. 2016-08-31 00:23:26 +00:00
image Site Icon: There is no good reason for class-wp-site-icon.php to drop a global instance of itself whenever the file is loaded. The lone use of the global instance of WP_Site_Icon is in an AJAX action that provides virtually no way to override - the file is loaded immediately before the global is used. 2016-08-25 19:08:38 +00:00
import Add wordpress-importer tests demonstrating slashed data behavior. 2016-08-19 13:26:04 +00:00
includes Tests: Ensure that the default wp_die() handler can handle a WP_Error object. 2016-03-23 19:00:38 +00:00
l10n I18N: Enable unloading of text domains that have been loaded just in time. 2016-06-23 14:47:44 +00:00
link Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. 2016-09-08 22:53:57 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Remove unnecessary uniqueness check in get_attachment_taxonomies(). 2016-08-30 03:06:06 +00:00
menu Docs: Fix phpdoc and jsdoc typos introduced in [38584] and [38587], respectively. 2016-09-11 18:45:59 +00:00
meta Unit Tests: 2016-08-27 08:35:16 +00:00
multisite Multisite: Use get_current_blog_id() in get_site() for current site. 2016-08-08 22:32:47 +00:00
oembed Embeds: Add tests for the WP_Embed class. 2016-06-28 20:30:15 +00:00
option Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate. 2016-08-26 20:21:30 +00:00
pomo mbstring.func_overload test should be skipped properly. 2016-02-29 22:37:42 +00:00
post Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. 2016-09-08 03:54:13 +00:00
query Query: Add and improve tests for query conditionals on the front page and home page. 2016-08-28 02:01:53 +00:00
rest-api REST API: Enable sanitize_callback to return WP_Error. 2016-09-14 15:49:37 +00:00
rewrite Unit Tests: 2016-08-27 08:35:16 +00:00
taxonomy Allow attachment taxonomies to be fetched as objects. 2016-08-20 17:34:13 +00:00
term Query: 'orderby=include' should support comma-separated lists. 2016-09-01 16:50:47 +00:00
theme I18N: Remove the requirement to call load_plugin_textdomain() / load_theme_textdomain(). 2016-05-10 20:04:52 +00:00
user Role/Capability: Correct the multisite cap tests after [38521]. 2016-09-05 12:08:39 +00:00
xmlrpc Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate. 2016-08-26 20:21:30 +00:00
actions.php Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. 2016-09-08 03:54:13 +00:00
adminbar.php Toolbar: Add unit tests for edit links. 2016-09-02 03:51:01 +00:00
auth.php Security: Trigger a _doing_it_wrong() when check_ajax_referer() is called without its first parameter. This brings it inline with check_admin_referer(). 2016-08-28 17:14:52 +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 Tests: Require Basic_Object and Basic_Subclass files earlier in call stack. 2016-08-30 14:32:04 +00:00
cache.php Unit Tests: Change some @group annotations to @ticket. 2016-07-04 20:24:52 +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 Comments: Restrict the maximum characters for input fields within the comments template. 2016-01-13 01:24:46 +00:00
comment.php Unit Tests: 2016-08-27 08:35:16 +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 Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate. 2016-08-26 20:21:30 +00:00
db.php Database: Fall back to utf8 when utf8mb4 isn't supported. 2016-09-08 23:48:05 +00:00
dbdelta.php Database: Normalise index names in dbDelta(). 2016-09-12 05:08:17 +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 Tests: Merge the two different wp_normalize_path() tests. 2016-03-08 07:06:12 +00:00
filters.php Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. 2016-09-08 03:54:13 +00:00
functions.php Unit tests: Don't change the memory_limit setting during tests. 2016-07-08 18:16:07 +00:00
kses.php Formatting: Allow KSES custom elements with hyphens 2016-09-02 04:16:00 +00:00
l10n.php L10n: Add unit tests for the override_load_textdomain filter. 2016-06-18 10:09:26 +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 tests for WP_Locale. 2016-01-13 23:49:52 +00:00
mail.php Mail: Don't set Sender field when setting From. 2016-08-20 02:16:54 +00:00
media.php Media: Adjust test_video_shortcode_body() after [38597]. 2016-09-13 14:08:24 +00:00
meta.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
multisite.php Initialise $_SERVER[ 'REMOTE_ADDR' ] during the test bootstrap so individual tests need not. 2015-09-15 08:04:33 +00:00
oembed.php Embeds: Clarify some assertion failure messages and correct a test URL for Twitter timelines. 2016-09-02 22:52:48 +00:00
pluggable.php Users: Deprecate the get_currentuserinfo() pluggable function. 2016-01-15 10:15:21 +00:00
post.php Unit Tests: 2016-08-27 08:35:16 +00:00
query.php Query: Avoid PHP notice in get_queried_object() when query contains NOT EXISTS tax query. 2016-09-09 19:36:22 +00:00
rest-api.php REST API: Create the general wp_check_jsonp_callback() function for validating JSONP callback functions. 2016-06-06 21:33:30 +00:00
rewrite.php Rewrite Rules: Ensure url_to_postid() operates as expected when it's used in the context of another site within a Multisite network that uses mixed URL schemes. 2016-02-28 02:12:13 +00:00
shortcode.php Shortcodes: Add the pre_do_shortcode_tag filter. 2016-09-02 00:09:42 +00:00
taxonomy.php Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. 2016-09-08 03:54:13 +00:00
template.php Themes: Add the non-encoded form of the queried item slug to the template hierarchy when the slug contains non-ASCII characters. 2016-09-09 00:47:17 +00:00
term.php Unit Tests: 2016-08-27 08:35:16 +00:00
theme.php Comments: Commit tests missed in [35848]. 2015-12-10 03:15:44 +00:00
upload.php Correct some more tests which were using example.org instead of WP_TESTS_DOMAIN. 2016-02-26 00:25:10 +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 Unit Tests: 2016-08-27 08:35:16 +00:00
walker.php Add unit tests for Walker class. 2014-08-01 20:35:25 +00:00
widgets.php Widgets: Revert [37425] and [37427]. 2016-06-06 21:50:29 +00:00
wp.php Query: Add a WP::remove_query_var() helper function. 2016-01-05 20:56:10 +00:00