WordPress/wp-includes
Sergey Biryukov a65e37770d Tests: Correct a flaky wp_nonce_field() test.
The test for `wp_nonce_field()` with a custom action name verifies that the nonce value matches the one returned by `wp_create_nonce()` with the same action name.

The created nonce, in turn, depends on `wp_nonce_tick()`, which returns a different result in the first and the second half of the nonce's lifespan, one day by default:
* 00:00:01 to 12:00:00 — First tick
* 12:00:01 to 00:00:00 — Second tick

In practice, due to a delay between initializing data providers and running the actual tests, it is possible for the nonce tick to change in the process, for example if the test suite run starts at 11:59:30, and the affected test runs at 12:00:30, causing a test failure.

This commit reduces the chance of a race condition by moving the `wp_create_nonce()` call from the data provider into the test itself.

Includes wrapping long lines with the expected results for better readability.

Follow-up to [54420].

Props NekoJonez, SergeyBiryukov.
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55006


git-svn-id: http://core.svn.wordpress.org/trunk@54539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-19 14:45:18 +00:00
..
assets Editor: Update block editor packages to the latest patch releases. 2022-11-11 12:46:55 +00:00
block-patterns
block-supports Docs: Various docblock fixes in Block Supports related functions. 2022-11-24 22:52:11 +00:00
blocks Themes: Revert one instance of wp_get_theme() from [54817]. 2022-11-11 16:34:12 +00:00
certificates
css Editor: Update block editor packages to the latest patch releases. 2022-11-11 12:46:55 +00:00
customize Coding Standards: Use HOUR_IN_SECONDS where appropriate. 2022-11-24 14:18:15 +00:00
fonts
ID3 External Libraries: Update getID3 to version 1.9.22. 2022-10-04 02:08:11 +00:00
images
IXR
js Media: Fix the version string of imgAreaSelect to indicate when the second set of modifications were made. 2022-12-02 20:21:11 +00:00
php-compat Code Modernization: Rename parameters that use reserved keywords in wp-includes/php-compat/readonly.php. 2022-12-08 19:31:17 +00:00
PHPMailer External Libraries: Upgrade PHPMailer to version 6.7. 2022-12-06 12:19:15 +00:00
pomo Code Modernization: Rename parameters that use reserved keywords in wp-includes/pomo/streams.php. 2022-12-12 20:21:12 +00:00
random_compat
Requests/src External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
rest-api Code Modernization: Rename parameters that use reserved keywords in wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php. 2022-12-14 14:31:11 +00:00
SimplePie
sitemaps Code Modernization: Rename parameters that use reserved keywords in wp-includes/sitemaps/class-wp-sitemaps.php. 2022-12-16 10:43:16 +00:00
sodium_compat Upgrade/Install: Update sodium_compat to v1.19.0. 2022-09-26 14:00:10 +00:00
style-engine Code Modernization: Add AllowDynamicProperties attribute to recently introduced classes. 2022-10-11 15:00:12 +00:00
Text
theme-compat Coding Standards: Various brace indentation corrections. 2022-11-26 21:01:17 +00:00
widgets Shortcodes: Revert recent apply_shortcodes and do_shortcode changes. 2022-09-26 22:43:10 +00:00
admin-bar.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
atomlib.php
author-template.php Users: Make wp_list_authors() and wp_list_users() filterable. 2022-09-20 16:26:10 +00:00
block-editor.php Docs: Fix block_editor_rest_api_preload() parameter type. 2022-11-09 09:51:14 +00:00
block-i18n.json
block-patterns.php Editor: Add post types property to wp-rest-block-patterns-controller.php. 2022-09-20 16:29:12 +00:00
block-template-utils.php Themes: Improve performance of _add_block_template_part_area_info and _add_block_template_info functions. 2022-12-15 22:55:16 +00:00
block-template.php Themes: Reduce usage of wp_get_theme function. 2022-11-11 16:26:12 +00:00
blocks.php Docs: Clarify default values for a few block function parameters. 2022-10-16 15:46:15 +00:00
bookmark-template.php
bookmark.php
cache-compat.php Cache API: Introduce wp_cache_supports() function. 2022-10-10 18:22:11 +00:00
cache.php Cache API: Introduce wp_cache_supports() function. 2022-10-10 18:22:11 +00:00
canonical.php Canonical: Protect against error for term not exists queries. 2022-11-10 03:01:14 +00:00
capabilities.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
category-template.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
category.php
class-feed.php
class-http.php
class-IXR.php
class-json.php Docs: Replace HTTP links with HTTPS in class-json.php docblocks. 2022-11-07 13:35:12 +00:00
class-oembed.php
class-phpass.php
class-phpmailer.php
class-pop3.php Docs: Replace HTTP links with HTTPS in class-pop3.php docblocks and JS vendor readme file. 2022-11-09 09:19:14 +00:00
class-requests.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
class-simplepie.php
class-smtp.php
class-snoopy.php
class-walker-category-dropdown.php
class-walker-category.php
class-walker-comment.php
class-walker-nav-menu.php Docs: Clarify documentation for the nav_menu_item_id filter. 2022-09-15 12:32:08 +00:00
class-walker-page-dropdown.php
class-walker-page.php
class-wp-admin-bar.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-ajax-response.php
class-wp-application-passwords.php
class-wp-block-editor-context.php
class-wp-block-list.php
class-wp-block-parser.php Editor: Sync changes from the Gutenberg plugin 14.1 release 2022-09-20 15:43:29 +00:00
class-wp-block-pattern-categories-registry.php
class-wp-block-patterns-registry.php Add: Documentation for postTypes pattern property. 2022-11-16 16:36:14 +00:00
class-wp-block-styles-registry.php
class-wp-block-supports.php Editor: Fix PHP notice in WP_Block_Supports when no attributes declared. 2022-10-11 18:46:13 +00:00
class-wp-block-template.php
class-wp-block-type-registry.php
class-wp-block-type.php Coding Standards: Always use strict type check for in_array(). 2022-11-29 21:00:14 +00:00
class-wp-block.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-23 21:30:13 +00:00
class-wp-comment-query.php
class-wp-comment.php
class-wp-customize-control.php
class-wp-customize-manager.php Customize: Fix a wrong condition on WP_Customize_Manager::has_published_pages(). 2022-12-05 21:31:11 +00:00
class-wp-customize-nav-menus.php
class-wp-customize-panel.php
class-wp-customize-section.php
class-wp-customize-setting.php
class-wp-customize-widgets.php
class-wp-date-query.php Docs: Document the usage of $wpdb global in WP_Date_Query methods. 2022-11-08 13:29:16 +00:00
class-wp-dependencies.php Docs: Correct the type for _WP_Dependency::$src property. 2022-11-25 15:12:16 +00:00
class-wp-dependency.php Docs: Correct the type for _WP_Dependency::$src property. 2022-11-25 15:12:16 +00:00
class-wp-editor.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-embed.php Shortcodes: Revert recent apply_shortcodes and do_shortcode changes. 2022-09-26 22:43:10 +00:00
class-wp-error.php
class-wp-fatal-error-handler.php
class-wp-feed-cache-transient.php
class-wp-feed-cache.php
class-wp-hook.php
class-wp-http-cookie.php
class-wp-http-curl.php
class-wp-http-encoding.php
class-wp-http-ixr-client.php
class-wp-http-proxy.php Docs: Align spelling with American English. 2022-10-21 21:12:14 +00:00
class-wp-http-requests-hooks.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
class-wp-http-requests-response.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
class-wp-http-response.php
class-wp-http-streams.php
class-wp-http.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
class-wp-image-editor-gd.php Media: Revert WebP generation. 2022-09-19 22:53:10 +00:00
class-wp-image-editor-imagick.php Media: Revert WebP generation. 2022-09-19 22:53:10 +00:00
class-wp-image-editor.php Media: ensure the wp_editor_set_quality filter consistently passes the correct output mime type. 2022-10-07 19:17:12 +00:00
class-wp-list-util.php Docs: Update various DocBlocks and inline comments per the documentation standards. 2022-11-17 18:15:19 +00:00
class-wp-locale-switcher.php Docs: Increase the specificity of various property documentation. 2022-09-26 22:10:16 +00:00
class-wp-locale.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-23 21:30:13 +00:00
class-wp-matchesmapregex.php Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-meta-query.php
class-wp-metadata-lazyloader.php Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-network-query.php Networks and Sites: Revert the use of the metadata API for *_network_options functions. 2022-10-18 18:16:16 +00:00
class-wp-network.php Networks and Sites: Store main site id of a network in network options. 2022-09-20 14:26:10 +00:00
class-wp-object-cache.php Docs: Increase the specificity of various property documentation. 2022-09-26 22:10:16 +00:00
class-wp-oembed-controller.php Docs: Document the usage of globals in some functions. 2022-11-13 13:51:20 +00:00
class-wp-oembed.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-paused-extensions-storage.php
class-wp-post-type.php Docs: Increase the specificity of various property documentation. 2022-09-26 22:10:16 +00:00
class-wp-post.php
class-wp-query.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/query.php. 2022-12-13 12:26:15 +00:00
class-wp-recovery-mode-cookie-service.php Security: Additional translations of salt default phrase. 2022-10-04 03:59:13 +00:00
class-wp-recovery-mode-email-service.php Site Health: Remove the WordPress 5.2 reference from the email sent on fatal errors. 2022-12-17 15:31:17 +00:00
class-wp-recovery-mode-key-service.php
class-wp-recovery-mode-link-service.php
class-wp-recovery-mode.php
class-wp-rewrite.php Docs: Various docblock fixes in WP_Rewrite class, as per documentation standards. 2022-10-04 23:01:13 +00:00
class-wp-role.php
class-wp-roles.php Role/Capability: Revert the newly added update_role function for 6.1. 2022-10-24 14:56:16 +00:00
class-wp-scripts.php I18N: Use correct default value for JavaScript translations path. 2022-09-28 22:19:10 +00:00
class-wp-session-tokens.php
class-wp-simplepie-file.php
class-wp-simplepie-sanitize-kses.php
class-wp-site-query.php Networks and Sites: Revert the use of the metadata API for *_network_options functions. 2022-10-18 18:16:16 +00:00
class-wp-site.php
class-wp-styles.php Script Loader: Prevent double space between attributes in WP_Styles class. 2022-09-28 14:59:10 +00:00
class-wp-tax-query.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-23 21:30:13 +00:00
class-wp-taxonomy.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-26 09:39:13 +00:00
class-wp-term-query.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-23 21:30:13 +00:00
class-wp-term.php
class-wp-text-diff-renderer-inline.php
class-wp-text-diff-renderer-table.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-textdomain-registry.php I18N: Change how WP_Textdomain_Registry stores the default languages path. 2022-10-24 10:02:16 +00:00
class-wp-theme-json-data.php Code Modernization: Add AllowDynamicProperties attribute to recently introduced classes. 2022-10-11 15:00:12 +00:00
class-wp-theme-json-resolver.php Coding Standards: Apply spacing changes after composer format. 2022-11-11 17:51:12 +00:00
class-wp-theme-json-schema.php
class-wp-theme-json.php Docs: Fix typo in the WP_Theme_JSON::PRESETS_METADATA constant description. 2022-11-17 16:58:20 +00:00
class-wp-theme.php Themes: Import Twenty Twenty-Three is now the default theme. 2022-09-20 01:36:09 +00:00
class-wp-user-meta-session-tokens.php
class-wp-user-query.php Query: Don't attempt caching if running a WP_User_Query before plugins_loaded. 2022-11-08 17:31:13 +00:00
class-wp-user-request.php
class-wp-user.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-walker.php
class-wp-widget-factory.php
class-wp-widget.php
class-wp-xmlrpc-server.php Docs: Improve various globals documentation, as per documentation standards. 2022-11-26 09:39:13 +00:00
class-wp.php Bootstrap/Load: Correct sending the X-Pingback header in WP::send_headers(). 2022-10-18 16:11:16 +00:00
class-wpdb.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wpdb.php. 2022-12-08 17:28:15 +00:00
class.wp-dependencies.php Coding Standards: Rename WordPress Dependencies API class files. 2022-09-20 14:17:12 +00:00
class.wp-scripts.php Coding Standards: Rename WordPress Dependencies API class files. 2022-09-20 14:17:12 +00:00
class.wp-styles.php Coding Standards: Rename WordPress Dependencies API class files. 2022-09-20 14:17:12 +00:00
comment-template.php Docs: Mark some optional parameters as such in wp-includes/comment-template.php. 2022-12-12 11:51:11 +00:00
comment.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
compat.php Docs: Update various DocBlocks and inline comments per the documentation standards. 2022-11-17 18:15:19 +00:00
cron.php Docs: Fix typo in a @since note for _get_cron_array(). 2022-10-12 11:53:15 +00:00
date.php
default-constants.php Themes: Import Twenty Twenty-Three is now the default theme. 2022-09-20 01:36:09 +00:00
default-filters.php Menus: Prevent infinite loop in menus. 2022-12-16 02:40:15 +00:00
default-widgets.php
deprecated.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
embed-template.php General: Use WPINC as a shorter reference to wp-includes in some files. 2022-06-17 11:20:13 +00:00
embed.php
error-protection.php
feed-atom-comments.php Coding Standards: Various brace indentation corrections. 2022-11-26 21:01:17 +00:00
feed-atom.php
feed-rdf.php
feed-rss2-comments.php
feed-rss2.php
feed-rss.php
feed.php
formatting.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.php. 2022-12-03 15:07:14 +00:00
functions.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
functions.wp-scripts.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.wp-scripts.php. 2022-12-04 12:46:16 +00:00
functions.wp-styles.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.wp-styles.php. 2022-12-04 12:48:11 +00:00
general-template.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/general-template.php. 2022-12-04 13:22:12 +00:00
global-styles-and-settings.php Editor: Ensure global styles are rendered for third-party blocks. 2022-10-27 15:41:12 +00:00
http.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
https-detection.php
https-migration.php
kses.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/kses.php. 2022-12-05 13:57:16 +00:00
l10n.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/l10n.php. 2022-12-06 13:03:18 +00:00
link-template.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/link-template.php. 2022-12-06 21:18:15 +00:00
load.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/load.php. 2022-12-06 21:33:17 +00:00
locale.php
media-template.php Customize: Escape blogname option in underscores templates. 2022-10-17 11:26:11 +00:00
media.php Media: Prevent decoding attribute corrupting JSON data. 2022-11-11 01:01:12 +00:00
meta.php Docs: Correct parameter name for deleted_{$meta_type}meta action. 2022-10-13 17:24:15 +00:00
ms-blogs.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/ms-blogs.php. 2022-12-06 22:16:13 +00:00
ms-default-constants.php
ms-default-filters.php Networks and Sites: Officially remove global terms. 2022-09-20 02:51:09 +00:00
ms-deprecated.php Docs: Improve various globals documentation, as per documentation standards. 2022-12-09 11:54:13 +00:00
ms-files.php
ms-functions.php Docs: Improve various globals documentation, as per documentation standards. 2022-12-09 11:54:13 +00:00
ms-load.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
ms-network.php Networks and Sites: Revert the use of the metadata API for *_network_options functions. 2022-10-18 18:16:16 +00:00
ms-settings.php
ms-site.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/ms-site.php. 2022-12-07 21:19:19 +00:00
nav-menu-template.php Menus: Account for legacy calls to nav_menu_css_class filter. 2022-12-19 00:01:14 +00:00
nav-menu.php Menus: Reset menu_item_parent to 0 when the parent is set to the item itself. 2022-12-14 22:54:14 +00:00
option.php Docs: Improve various globals documentation, as per documentation standards. 2022-12-09 11:54:13 +00:00
pluggable-deprecated.php
pluggable.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/pluggable.php. 2022-12-09 00:24:17 +00:00
plugin.php
post-formats.php
post-template.php Docs: Improve DocBlock formatting for get_post_class(). 2022-12-12 11:17:17 +00:00
post-thumbnail-template.php
post.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/post.php. 2022-12-13 00:03:15 +00:00
query.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/query.php. 2022-12-13 12:26:15 +00:00
registration-functions.php
registration.php
rest-api.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:32:17 +00:00
revision.php Coding Standards: Use HOUR_IN_SECONDS where appropriate. 2022-11-24 14:18:15 +00:00
rewrite.php Code Modernization: Rename parameters that use reserved keywords in wp-includes/rewrite.php. 2022-12-15 11:03:11 +00:00
robots-template.php
rss-functions.php
rss.php
script-loader.php Text Changes: Remove capitalization on "site editing". 2022-11-10 11:33:14 +00:00
session.php
shortcodes.php Shortcodes: Revert recent apply_shortcodes and do_shortcode changes. 2022-09-26 22:43:10 +00:00
sitemaps.php
spl-autoload-compat.php
style-engine.php Editor: Backport Style Engine API functions, classes and tests. 2022-09-14 12:48:16 +00:00
taxonomy.php Docs: Update various DocBlocks and inline comments per the documentation standards. 2022-11-17 18:15:19 +00:00
template-canvas.php
template-loader.php
template.php Docs: Add brackets to a function name in get_page_template() description. 2022-11-02 19:52:18 +00:00
theme-i18n.json Editor: Introduce spacing presets in global style properties. 2022-09-21 11:43:13 +00:00
theme-templates.php Themes: Reduce usage of wp_get_theme function. 2022-11-11 16:26:12 +00:00
theme.json Editor: Backport foundation for Layout block support refactor (part 1). 2022-09-14 18:44:09 +00:00
theme.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
update.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
user.php Docs: Improve various globals documentation, as per documentation standards. 2022-12-09 11:54:13 +00:00
vars.php
version.php Tests: Correct a flaky wp_nonce_field() test. 2022-12-19 14:45:18 +00:00
widgets.php Widgets: Escape RSS error messages for display. 2022-10-17 12:41:11 +00:00
wlwmanifest.xml
wp-db.php
wp-diff.php