Make WordPress Core


Ignore:
Timestamp:
07/31/2022 03:03:46 PM (2 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/doAllHook.php

    r52389 r53804  
    1313        $callback      = array( $a, 'action' );
    1414        $hook          = new WP_Hook();
    15         $tag           = 'all';
     15        $hook_name     = 'all';
    1616        $priority      = 1;
    1717        $accepted_args = 2;
    1818        $arg           = 'all_arg';
    1919
    20         $hook->add_filter( $tag, $callback, $priority, $accepted_args );
     20        $hook->add_filter( $hook_name, $callback, $priority, $accepted_args );
    2121        $args = array( $arg );
    2222        $hook->do_all_hook( $args );
Note: See TracChangeset for help on using the changeset viewer.