Make WordPress Core

Changeset 63160


Ignore:
Timestamp:
08/08/2026 12:45:30 AM (5 weeks ago)
Author:
SergeyBiryukov
Message:

Tests: Correct @var annotation in REST users controller tests.

The $query variable comes from the pre_user_query filter args and is a WP_User_Query instance, the assertInstanceOf( WP_User_Query::class, ... ) on the line above asserts exactly that. The docblock incorrectly declared it as WP_User.

Developed in https://github.com/WordPress/wordpress-develop/pull/12834.

Follow-up to r59899.

Props Soean.
See #64894.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-users-controller.php

    r60814 r63160  
    32843284                $this->assertInstanceOf( WP_User_Query::class, $args[0][0], 'Query parameters were not captured.' );
    32853285
    3286                 /** @var WP_User $query */
     3286                /** @var WP_User_Query $query */
    32873287                $query = $args[0][0];
    32883288
Note: See TracChangeset for help on using the changeset viewer.