Make WordPress Core


Ignore:
Timestamp:
06/15/2022 01:35:28 PM (3 years ago)
Author:
SergeyBiryukov
Message:

REST API: Some documentation and test improvements for update_menu_item_cache():

  • Make the function description more specific, for consistency with other similar functions.
  • Add a @since note for the $update_menu_item_cache parameter of WP_Query::parse_query().
  • Add missing @covers tags for the unit tests.

Follow-up to [53504].

See #55620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/nav-menu.php

    r53504 r53508  
    205205    /**
    206206     * @ticket 55620
    207      */
    208     public function test_update_menu_item_cache_primed_post() {
     207     * @covers update_menu_item_cache
     208     */
     209    public function test_update_menu_item_cache_primed_posts() {
    209210        $post_id = self::factory()->post->create();
    210211        wp_update_nav_menu_item(
     
    230231        $args = $action->get_args();
    231232        $last = end( $args );
    232         $this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches was not executed.' );
     233        $this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches() was not executed.' );
    233234    }
    234235
    235236    /**
    236237     * @ticket 55620
     238     * @covers update_menu_item_cache
    237239     */
    238240    public function test_update_menu_item_cache_primed_terms() {
     
    261263        $args = $action->get_args();
    262264        $last = end( $args );
    263         $this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches was not executed.' );
     265        $this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches() was not executed.' );
    264266    }
    265267
Note: See TracChangeset for help on using the changeset viewer.