Make WordPress Core


Ignore:
Timestamp:
07/31/2022 04:25:27 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Update the terminology used for action or filter names in MockAction class.

This replaces the "tag" wording with "hook name" where appropriate, to match the core function signatures.

Includes:

  • Introducing a ::get_hook_names() method instead of ::get_tags(), keeping the latter as an alias.
  • Adding a hook_name key to the ::$events property, keeping tag for backward compatibility for now.
  • Adding missing @since tags for class methods.

Follow-up to [24/tests], [62/tests], [70/tests], [50807], [53804].

See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/author.php

    r53147 r53805  
    174174
    175175        $this->assertSame( 1, $filter->get_call_count() );
    176         $this->assertSame( array( 'the_author_link' ), $filter->get_tags() );
     176        $this->assertSame( array( 'the_author_link' ), $filter->get_hook_names() );
    177177    }
    178178}
Note: See TracChangeset for help on using the changeset viewer.