Make WordPress Core


Ignore:
Timestamp:
07/31/2022 03:03:46 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Update the terminology used for action or filter names in hook tests.

This replaces the $tag variables with $hook_name, to match the core function signatures.

Follow-up to [24/tests], [62/tests], [866/tests], [1294/tests], [38571], [50807].

See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/hooks/iterator.php

    r52389 r53804  
    1313                $callback_two  = '__return_false';
    1414                $hook          = new WP_Hook();
    15                 $tag           = __FUNCTION__;
     15                $hook_name     = __FUNCTION__;
    1616                $priority      = 1;
    1717                $accepted_args = 2;
    1818
    19                 $hook->add_filter( $tag, $callback_one, $priority, $accepted_args );
    20                 $hook->add_filter( $tag, $callback_two, $priority + 1, $accepted_args );
     19                $hook->add_filter( $hook_name, $callback_one, $priority, $accepted_args );
     20                $hook->add_filter( $hook_name, $callback_two, $priority + 1, $accepted_args );
    2121
    2222                $functions  = array();
Note: See TracChangeset for help on using the changeset viewer.