Make WordPress Core


Ignore:
Timestamp:
11/22/2022 09:25:27 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct references to set_up() and tear_down() in various DocBlocks.

The setUp() and tearDown() methods were renamed to set_up() and tear_down(), respectively, as part of implementing the void return type solution for PHPUnit 8.0.

Follow-up to [29120], [29251], [30277], [32173], [32806], [38829], [42379], [50450], [51276], [51568].

See #56793.

File:
1 edited

Legend:

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

    r54366 r54865  
    323323     *
    324324     * Stores $wp_actions, $wp_current_filter, and $wp_filter on a class variable
    325      * so they can be restored on tearDown() using _restore_hooks().
     325     * so they can be restored on tear_down() using _restore_hooks().
    326326     *
    327327     * @global array $wp_actions
     
    341341
    342342    /**
    343      * Restores the hook-related globals to their state at setUp()
     343     * Restores the hook-related globals to their state at set_up()
    344344     * so that future tests aren't affected by hooks set during this last test.
    345345     *
     
    13661366     * Deletes files added to the `uploads` directory during tests.
    13671367     *
    1368      * This method works in tandem with the `setUp()` and `rmdir()` methods:
    1369      * - `setUp()` scans the `uploads` directory before every test, and stores its contents inside of the
    1370      *   `$ignore_files` property.
    1371      * - `rmdir()` and its helper methods only delete files that are not listed in the `$ignore_files` property. If
    1372      *   called during `tearDown()` in tests, this will only delete files added during the previously run test.
     1368     * This method works in tandem with the `set_up()` and `rmdir()` methods:
     1369     * - `set_up()` scans the `uploads` directory before every test, and stores
     1370     *   its contents inside of the `$ignore_files` property.
     1371     * - `rmdir()` and its helper methods only delete files that are not listed
     1372     *   in the `$ignore_files` property. If called during `tear_down()` in tests,
     1373     *   this will only delete files added during the previously run test.
    13731374     */
    13741375    public function remove_added_uploads() {
Note: See TracChangeset for help on using the changeset viewer.