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/actions/callbacks.php

    r52010 r53804  
    1212     */
    1313    public function test_callback_representations() {
    14         $tag = __FUNCTION__;
     14        $hook_name = __FUNCTION__;
    1515
    16         $this->assertFalse( has_action( $tag ) );
     16        $this->assertFalse( has_action( $hook_name ) );
    1717
    18         add_action( $tag, array( 'Class', 'method' ) );
     18        add_action( $hook_name, array( 'Class', 'method' ) );
    1919
    20         $this->assertSame( 10, has_action( $tag, array( 'Class', 'method' ) ) );
     20        $this->assertSame( 10, has_action( $hook_name, array( 'Class', 'method' ) ) );
    2121
    22         $this->assertSame( 10, has_action( $tag, 'Class::method' ) );
     22        $this->assertSame( 10, has_action( $hook_name, 'Class::method' ) );
    2323    }
    2424}
Note: See TracChangeset for help on using the changeset viewer.