WordPress/wp-includes
Sergey Biryukov 13f618c449 Code Modernization: Explicitly declare all properties created in set_up() methods of various test classes.
Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

In each of the cases included in this commit, one or more properties are dynamically created in the `set_up()` method of the test class. This commit explicitly declares these properties.

As these properties are being declared on test classes, they are marked as private. Even though the original dynamic property was public, this should not be considered a backward compatibility break as this only involves test classes.

Notes:
* As these properties receive assignments during test runs or a one-time assignment, but the assignment uses a function call or variable access, these properties cannot be changed to class constants, but they should be declared explicitly as properties on the class.
* In `Tests_Theme_CustomHeader`, the `$customize_manager` property is given a default value of `null`, same as it was already being reset to `null` in the `tear_down()` method.
* In `Tests_Privacy_wpPrivacyProcessPersonalDataExportPage` and `Tests_Privacy_wpPrivacyGeneratePersonalDataExportFile` classes, the property name had a leading `_` underscore. This is an outdated PHP 4 practice to indicate a private property. As PHP 4 is no longer supported, the property has been renamed to `$orig_error_level`.
* Along the same lines, in `Tests_Menu_Walker_Nav_Menu`, the property name also had a leading `_` underscore. The property has been renamed to `$orig_wp_nav_menu_max_depth`.
* In the `Tests_Shortcode` class, three properties were already being (re)set in the `set_up() `method, while three others were being set for most tests via the `shortcode_test_shortcode_tag()` method or in the tests themselves. It is ensured now that all six properties are given their initial `null` value in the `set_up()` method and are explicitly declared.

Additionally:
* In the `Tests_User_Session` class, the `set_up()` method is incorrect. No assertions should be executed in fixture methods, but the `set_up()` method contains two assertions. This has not been addressed yet as it is outside the scope of this commit, but should be addressed at a later point in time.

Follow-up to [12/tests], [218/tests], [374/tests], [384/tests], [986/tests], [1106/tests], [1239/tests], [28704], [29221], [29347], [32648], [36519], [37953], [38832], [40142], [40825], [43584], [43768], [44786], [45141], [53557], [53558], [53850], [53851], [53852], [53853], [53854], [53856], [53916], [53935], [53936], [53937], [53938], [53942], [53945].

Props jrf.
See #56033.
Built from https://develop.svn.wordpress.org/trunk@53948


git-svn-id: http://core.svn.wordpress.org/trunk@53507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-27 12:32:12 +00:00
..
assets Editor: Backport bug fixes from Gutenberg into Core for WP 6.0.2 RC 2022-08-23 15:42:33 +00:00
block-patterns
block-supports
blocks Editor: Backport bug fixes from Gutenberg into Core for WP 6.0.2 RC 2022-08-23 15:42:33 +00:00
certificates
css Editor: Backport bug fixes from Gutenberg into Core for WP 6.0.2 RC 2022-08-23 15:42:33 +00:00
customize
fonts
ID3
images
IXR
js Editor: Backport bug fixes from Gutenberg into Core for WP 6.0.2 RC 2022-08-23 15:42:33 +00:00
php-compat
PHPMailer External Libraries: Upgrade PHPMailer to version 6.6.4. 2022-08-22 12:26:12 +00:00
pomo
random_compat
Requests
rest-api Application Passwords: Allow a Super Admin to set an application password on a site they're not a member of. 2022-08-11 18:24:09 +00:00
SimplePie
sitemaps
sodium_compat
Text
theme-compat
widgets
admin-bar.php
atomlib.php
author-template.php
block-editor.php
block-i18n.json
block-patterns.php Block Patterns: Add new Footers category 2022-08-25 15:42:10 +00:00
block-template-utils.php Editor: Ensure get_block_templates() returns unique templates or template parts. 2022-08-23 14:52:12 +00:00
block-template.php
blocks.php
bookmark-template.php
bookmark.php
cache-compat.php
cache.php
canonical.php
capabilities.php
category-template.php Taxonomy: Associate field descriptions with fields. 2022-08-19 23:06:09 +00:00
category.php
class-feed.php
class-http.php
class-IXR.php
class-json.php
class-oembed.php
class-phpass.php
class-phpmailer.php
class-pop3.php
class-requests.php
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
class-walker-page-dropdown.php
class-walker-page.php
class-wp-admin-bar.php
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
class-wp-block-pattern-categories-registry.php
class-wp-block-patterns-registry.php
class-wp-block-styles-registry.php
class-wp-block-supports.php
class-wp-block-template.php
class-wp-block-type-registry.php
class-wp-block-type.php
class-wp-block.php
class-wp-comment-query.php
class-wp-comment.php
class-wp-customize-control.php
class-wp-customize-manager.php
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
class-wp-dependency.php
class-wp-editor.php
class-wp-embed.php
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
class-wp-http-requests-hooks.php
class-wp-http-requests-response.php
class-wp-http-response.php
class-wp-http-streams.php
class-wp-http.php
class-wp-image-editor-gd.php
class-wp-image-editor-imagick.php
class-wp-image-editor.php
class-wp-list-util.php
class-wp-locale-switcher.php
class-wp-locale.php
class-wp-matchesmapregex.php
class-wp-meta-query.php Query: Cast the meta key to BINARY for case-sensitive key comparisons in WP_Meta_Query. 2022-08-17 14:00:13 +00:00
class-wp-metadata-lazyloader.php
class-wp-network-query.php
class-wp-network.php
class-wp-object-cache.php
class-wp-oembed-controller.php
class-wp-oembed.php
class-wp-paused-extensions-storage.php
class-wp-post-type.php
class-wp-post.php
class-wp-query.php Query: Cache post ID database query within WP_Query. 2022-08-25 04:23:13 +00:00
class-wp-recovery-mode-cookie-service.php
class-wp-recovery-mode-email-service.php
class-wp-recovery-mode-key-service.php
class-wp-recovery-mode-link-service.php
class-wp-recovery-mode.php
class-wp-rewrite.php
class-wp-role.php
class-wp-roles.php
class-wp-session-tokens.php
class-wp-simplepie-file.php
class-wp-simplepie-sanitize-kses.php
class-wp-site-query.php
class-wp-site.php
class-wp-tax-query.php Docs: Use third-person singular verbs for function descriptions in WP_Tax_Query class, as per docblocks standards. 2022-08-18 11:28:12 +00:00
class-wp-taxonomy.php
class-wp-term-query.php
class-wp-term.php
class-wp-text-diff-renderer-inline.php
class-wp-text-diff-renderer-table.php
class-wp-textdomain-registry.php
class-wp-theme-json-resolver.php
class-wp-theme-json-schema.php
class-wp-theme-json.php
class-wp-theme.php Themes: Add support for Update URI header. 2022-08-23 17:48:15 +00:00
class-wp-user-meta-session-tokens.php
class-wp-user-query.php
class-wp-user-request.php
class-wp-user.php
class-wp-walker.php
class-wp-widget-factory.php
class-wp-widget.php
class-wp-xmlrpc-server.php
class-wp.php
class-wpdb.php Database: Account for utf8 being renamed to utf8mb3 in newer MariaDB and MySQL versions. 2022-08-22 15:39:13 +00:00
class.wp-dependencies.php
class.wp-scripts.php
class.wp-styles.php
comment-template.php
comment.php Cache API, Docs: Remove private delegation from cache priming functions. 2022-08-26 01:03:14 +00:00
compat.php
cron.php
date.php
default-constants.php
default-filters.php
default-widgets.php
deprecated.php
embed-template.php
embed.php Embeds: Fix missing labels and duplicate IDs. 2022-08-19 22:06:09 +00:00
error-protection.php
feed-atom-comments.php
feed-atom.php
feed-rdf.php
feed-rss2-comments.php
feed-rss2.php
feed-rss.php
feed.php
formatting.php
functions.php Coding Standards: Use strict comparisons in path_is_absolute(). 2022-08-26 18:59:13 +00:00
functions.wp-scripts.php
functions.wp-styles.php
general-template.php Script Loader: Remove default DNS prefetch entry for s.w.org. 2022-08-18 08:45:12 +00:00
global-styles-and-settings.php
http.php
https-detection.php
https-migration.php
kses.php
l10n.php
link-template.php Docs: Remove incorrect default value for $path argument of admin_url(). 2022-08-19 19:48:15 +00:00
load.php Coding Standards: Simplify the logic in wp_not_installed(). 2022-08-20 00:32:10 +00:00
locale.php
media-template.php
media.php
meta.php
ms-blogs.php
ms-default-constants.php
ms-default-filters.php
ms-deprecated.php
ms-files.php Multisite: Log error/warnings/notices from ms-files.php. 2021-07-06 20:21:57 +00:00
ms-functions.php
ms-load.php
ms-network.php Cache API, Docs: Remove private delegation from cache priming functions. 2022-08-26 01:03:14 +00:00
ms-settings.php
ms-site.php Cache API, Docs: Remove private delegation from cache priming functions. 2022-08-26 01:03:14 +00:00
nav-menu-template.php
nav-menu.php
option.php Coding Standards: Check for deprecated options before wp_installing(). 2022-08-20 00:27:12 +00:00
pluggable-deprecated.php
pluggable.php Mail: Prevent the last character of names in “From” headers from being trimmed. 2022-08-16 18:18:14 +00:00
plugin.php
post-formats.php
post-template.php
post-thumbnail-template.php
post.php Cache API, Docs: Remove private delegation from cache priming functions. 2022-08-26 01:03:14 +00:00
query.php
registration-functions.php
registration.php
rest-api.php
revision.php
rewrite.php
robots-template.php
rss-functions.php
rss.php
script-loader.php
session.php
shortcodes.php
sitemaps.php
spl-autoload-compat.php
taxonomy.php Cache API, Docs: Remove private delegation from cache priming functions. 2022-08-26 01:03:14 +00:00
template-canvas.php
template-loader.php
template.php
theme-i18n.json
theme-templates.php
theme.json
theme.php
update.php Themes: Add support for Update URI header. 2022-08-23 17:48:15 +00:00
user.php
vars.php
version.php Code Modernization: Explicitly declare all properties created in set_up() methods of various test classes. 2022-08-27 12:32:12 +00:00
widgets.php
wlwmanifest.xml
wp-db.php
wp-diff.php