Make WordPress Core

Changeset 65825


Ignore:
Timestamp:
11/30/2026 02:09:34 PM (less than one hour ago)
Author:
lancewillett
Message:

Tests: Make the note and reaction data providers static.

Allow PHPUnit 11 to discover the ten existing AJAX and REST test cases.

Follow-up to [65750].

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

Props harshalwp, mukesh27.
See #62004, #66211.

Location:
trunk/tests/phpunit/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/wpAjaxEditComment.php

    r65750 r65825  
    754754         * @return array<non-falsy-string, array{ non-falsy-string }>
    755755         */
    756         public function data_types_a_note_cannot_become(): array {
     756        public static function data_types_a_note_cannot_become(): array {
    757757                return array(
    758758                        'comment'        => array( 'comment' ),
  • trunk/tests/phpunit/tests/ajax/wpAjaxReplytoComment.php

    r65750 r65825  
    323323         * @return array<non-falsy-string, array{ non-falsy-string }>
    324324         */
    325         public function data_restricted_comment_types(): array {
     325        public static function data_restricted_comment_types(): array {
    326326                return array(
    327327                        'reaction'              => array( 'reaction' ),
  • trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php

    r65750 r65825  
    69126912         * @return array<string, array{string}>
    69136913         */
    6914         public function data_note_child_types(): array {
     6914        public static function data_note_child_types(): array {
    69156915                return array(
    69166916                        'a reaction' => array( 'reaction' ),
Note: See TracChangeset for help on using the changeset viewer.