Make WordPress Core

Changeset 61604


Ignore:
Timestamp:
02/09/2026 06:42:51 PM (6 months ago)
Author:
westonruter
Message:

Docs: Improve @global annotations in abstract-testcase.php

Developed in https://github.com/WordPress/wordpress-develop/pull/10841

Follow-up to [61589], [61584].

Props noruzzaman, mukesh27, westonruter, shailu25, huzaifaalmesbah.
See #64224.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r61589 r61604  
    161161         * After a test method runs, resets any state in WordPress the test method might have changed.
    162162         *
    163          * @global wpdb       $wpdb         WordPress database abstraction object.
    164          * @global WP_Query   $wp_the_query WordPress Query object.
    165          * @global WP_Query   $wp_query     WordPress Query object.
    166          * @global WP         $wp           WordPress environment object.
     163         * @global wpdb     $wpdb         WordPress database abstraction object.
     164         * @global WP_Query $wp_the_query Main WordPress query object.
     165         * @global WP_Query $wp_query     WordPress query object.
     166         * @global WP       $wp           WordPress environment object.
    167167         */
    168168        public function tear_down() {
     
    371371         * on a class variable so they can be restored on tear_down() using _restore_hooks().
    372372         *
    373          * @global array $wp_filter         Stores all of the filters and actions.
    374          * @global array $wp_actions        Stores the number of times each action was triggered.
    375          * @global array $wp_filters        Stores the number of times each filter was triggered.
    376          * @global array $wp_current_filter Stores the list of current filters with the current one last.
     373         * @global array $wp_filter         All of the filters and actions.
     374         * @global array $wp_actions        The number of times each action was triggered.
     375         * @global array $wp_filters        The number of times each filter was triggered.
     376         * @global array $wp_current_filter The list of current filters with the current one last.
    377377         */
    378378        protected function _backup_hooks() {
     
    394394         * so that future tests aren't affected by hooks set during this last test.
    395395         *
    396          * @global array $wp_filter         Stores all of the filters and actions.
    397          * @global array $wp_actions        Stores the number of times each action was triggered.
    398          * @global array $wp_filters        Stores the number of times each filter was triggered.
    399          * @global array $wp_current_filter Stores the list of current filters with the current one last.
     396         * @global array $wp_filter         All of the filters and actions.
     397         * @global array $wp_actions        The number of times each action was triggered.
     398         * @global array $wp_filters        The number of times each filter was triggered.
     399         * @global array $wp_current_filter The list of current filters with the current one last.
    400400         */
    401401        protected function _restore_hooks() {
Note: See TracChangeset for help on using the changeset viewer.