Make WordPress Core

Changeset 64440


Ignore:
Timestamp:
10/17/2026 06:53:58 PM (5 days ago)
Author:
lancewillett
Message:

Tests: Make function test data providers static.

Declare the data providers in tests/phpunit/tests/functions/ as public static for compatibility with newer PHPUnit versions. Preserve their datasets and assertions. Make the daylight-saving-time helper static so the timezone provider does not require an instance.

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

Props rejaulalomkhan, huzaifaalmesbah.
See #66211.

Location:
trunk/tests/phpunit/tests/functions
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions/absint.php

    r63646 r64440  
    2727         * @return array<non-falsy-string, array{ test_value: mixed, expected_value: non-negative-int }>
    2828         */
    29         public function data_absint(): array {
     29        public static function data_absint(): array {
    3030                return array(
    3131                        '1 int'                 => array(
    … …  
    100100         * @return array<non-falsy-string, array{ test_value: mixed, expected_value: non-negative-int }>
    101101         */
    102         public function data_absint_other_types(): array {
     102        public static function data_absint_other_types(): array {
    103103                /*
    104104                 * The largest power of two which fits in an integer, and which is therefore
    … …  
    185185         * @return array<non-falsy-string, array{ test_value: mixed, expected_value: non-negative-int }>
    186186         */
    187         public function data_absint_extreme_values(): array {
     187        public static function data_absint_extreme_values(): array {
    188188                return array(
    189189                        'PHP_INT_MAX'                             => array(
    … …  
    243243         * @return array<non-falsy-string, array{ test_value: float, expected_value: non-negative-int }>
    244244         */
    245         public function data_absint_unrepresentable_floats(): array {
     245        public static function data_absint_unrepresentable_floats(): array {
    246246                return array(
    247247                        '(float) PHP_INT_MAX (2^63)'  => array(
  • trunk/tests/phpunit/tests/functions/addMagicQuotes.php

    r57735 r64440  
    2929         * }
    3030         */
    31         public function data_add_magic_quotes() {
     31        public static function data_add_magic_quotes() {
    3232                return array(
    3333                        array(
  • trunk/tests/phpunit/tests/functions/allowedProtocols.php

    r62957 r64440  
    4343         * @return array[]
    4444         */
    45         public function data_example_urls() {
     45        public static function data_example_urls() {
    4646                return array(
    4747                        array( 'http', 'http://example.com' ),                                 // RFC7230
  • trunk/tests/phpunit/tests/functions/anonymization.php

    r57099 r64440  
    4747         * }
    4848         */
    49         public function data_wp_privacy_anonymize_ip() {
     49        public static function data_wp_privacy_anonymize_ip() {
    5050                return array(
    5151                        // Invalid IP.
    … …  
    201201         * }
    202202         */
    203         public function data_wp_privacy_anonymize_ip_with_inet_dependency() {
     203        public static function data_wp_privacy_anonymize_ip_with_inet_dependency() {
    204204                return array(
    205205                        // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings.
  • trunk/tests/phpunit/tests/functions/cleanDirsizeCache.php

    r57987 r64440  
    3232         * @return array
    3333         */
    34         public function data_clean_dirsize_cache_with_invalid_inputs() {
     34        public static function data_clean_dirsize_cache_with_invalid_inputs() {
    3535                return array(
    3636                        'null'         => array(
    … …  
    7979         * @return array
    8080         */
    81         public function data_clean_dirsize_cache_with_non_path_string() {
     81        public static function data_clean_dirsize_cache_with_non_path_string() {
    8282                return array(
    8383                        'single dot'                        => array(
  • trunk/tests/phpunit/tests/functions/cleanupHeaderComment.php

    r56971 r64440  
    3232         * }
    3333         */
    34         public function data_cleanup_header_comment() {
     34        public static function data_cleanup_header_comment() {
    3535                return array(
    3636                        // Set 0: A string.
  • trunk/tests/phpunit/tests/functions/doEnclose.php

    r62957 r64440  
    7474         * }
    7575         */
    76         public function data_do_enclose() {
     76        public static function data_do_enclose() {
    7777                return array(
    7878                        'null'                  => array(
  • trunk/tests/phpunit/tests/functions/forceSslAdmin.php

    r63640 r64440  
    4545         * @return array[]
    4646         */
    47         public function data_force_ssl_admin() {
     47        public static function data_force_ssl_admin() {
    4848                return array(
    4949                        'default'          => array( null, false ),
  • trunk/tests/phpunit/tests/functions/getFileData.php

    r62803 r64440  
    4747         * }>
    4848         */
    49         public function data_test_get_data_file() {
     49        public static function data_test_get_data_file() {
    5050                return array(
    5151                        'theme headers'             => array(
  • trunk/tests/phpunit/tests/functions/getNonCachedIds.php

    r56971 r64440  
    4646         * @return array[]
    4747         */
    48         public function data_valid_ids_should_be_returned_as_integers() {
     48        public static function data_valid_ids_should_be_returned_as_integers() {
    4949                return array(
    5050                        '(int) 1'    => array( 1 ),
    … …  
    8888         * @return array[]
    8989         */
    90         public function data_invalid_cache_ids_should_throw_a_notice() {
     90        public static function data_invalid_cache_ids_should_throw_a_notice() {
    9191                return array(
    9292                        'null'         => array( null ),
  • trunk/tests/phpunit/tests/functions/getStatusHeaderDesc.php

    r62593 r64440  
    2727         * @return array[]
    2828         */
    29         public function data_get_status_header_desc() {
     29        public static function data_get_status_header_desc() {
    3030                return array(
    3131                        array( 200, 'OK' ),
  • trunk/tests/phpunit/tests/functions/getTagRegex.php

    r63331 r64440  
    3737         * @return array[]
    3838         */
    39         public function data_get_tag_regex_matches() {
     39        public static function data_get_tag_regex_matches() {
    4040                // Each case embeds the element(s) within surrounding HTML, mirroring the
    4141                // original usage in get_media_embedded_in_content(), which is passed a
  • trunk/tests/phpunit/tests/functions/isNewDay.php

    r57735 r64440  
    3333         * @return array[]
    3434         */
    35         public function data_is_new_date() {
     35        public static function data_is_new_date() {
    3636                return array(
    3737                        array( '21.05.19', '21.05.19', 0 ),
  • trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php

    r57735 r64440  
    2828         * @return array[]
    2929         */
    30         public function data_is_php_version_compatible() {
     30        public static function data_is_php_version_compatible() {
    3131                $php_version = PHP_VERSION;
    3232
  • trunk/tests/phpunit/tests/functions/isSerialized.php

    r57735 r64440  
    2828         * @return array[]
    2929         */
    30         public function data_is_serialized() {
     30        public static function data_is_serialized() {
    3131                return array(
    3232                        'serialized empty array'            => array(
    … …  
    100100         * @return array[]
    101101         */
    102         public function data_is_not_serialized() {
     102        public static function data_is_not_serialized() {
    103103                return array(
    104104                        'an empty array'                             => array(
    … …  
    198198         * @return array[]
    199199         */
    200         public function data_is_serialized_should_return_true_for_large_floats() {
     200        public static function data_is_serialized_should_return_true_for_large_floats() {
    201201                return array(
    202202                        array( serialize( 1.7976931348623157E+308 ) ),
  • trunk/tests/phpunit/tests/functions/isSerializedString.php

    r57735 r64440  
    2727         * @return array[]
    2828         */
    29         public function data_is_serialized_string() {
     29        public static function data_is_serialized_string() {
    3030                return array(
    3131                        'an array'                                => array(
  • trunk/tests/phpunit/tests/functions/isWpVersionCompatible.php

    r58843 r64440  
    6161         * @return array[]
    6262         */
    63         public function data_is_wp_version_compatible() {
     63        public static function data_is_wp_version_compatible() {
    6464                $wp_version     = wp_get_wp_version();
    6565                $version_parts  = explode( '.', $wp_version );
    … …  
    153153         * @return array[]
    154154         */
    155         public function data_is_wp_version_compatible_should_gracefully_handle_trailing_point_zero_version_numbers() {
     155        public static function data_is_wp_version_compatible_should_gracefully_handle_trailing_point_zero_version_numbers() {
    156156                return array(
    157157                        'an incorrect trailing .0 and the same version' => array(
    … …  
    225225         * @return array[]
    226226         */
    227         public function data_is_wp_version_compatible_with_development_versions() {
     227        public static function data_is_wp_version_compatible_with_development_versions() {
    228228                // For consistent results, remove possible suffixes.
    229229                list( $version ) = explode( '-', wp_get_wp_version() );
  • trunk/tests/phpunit/tests/functions/listFiles.php

    r56971 r64440  
    5858         * @return array[]
    5959         */
    60         public function data_list_files_should_optionally_include_hidden_files() {
     60        public static function data_list_files_should_optionally_include_hidden_files() {
    6161                return array(
    6262                        '$include_hidden = false and no exclusions' => array(
  • trunk/tests/phpunit/tests/functions/maybeSerialize.php

    r64110 r64440  
    5757         * @return array[]
    5858         */
    59         public function data_is_serialized() {
     59        public static function data_is_serialized() {
    6060                return array(
    6161                        'serialized empty array'            => array(
    … …  
    125125         * @return array[]
    126126         */
    127         public function data_is_not_serialized() {
     127        public static function data_is_not_serialized() {
    128128                return array(
    129129                        'an empty array'                             => array(
    … …  
    235235         * @return array[]
    236236         */
    237         public function data_serialize_deserialize_objects() {
     237        public static function data_serialize_deserialize_objects() {
    238238                return array(
    239239                        'filtered iterator using md5'  => array(
  • trunk/tests/phpunit/tests/functions/removeQueryArg.php

    r57735 r64440  
    2323         * @return array[]
    2424         */
    25         public function data_remove_query_arg() {
     25        public static function data_remove_query_arg() {
    2626                return array(
    2727                        array( 'foo', 'edit.php?foo=test1&baz=test1', 'edit.php?baz=test1' ),
  • trunk/tests/phpunit/tests/functions/sizeFormat.php

    r63461 r64440  
    1919         * @return array[]
    2020         */
    21         public function data_size_format() {
     21        public static function data_size_format() {
    2222                return array(
    2323                        // Invalid values.
  • trunk/tests/phpunit/tests/functions/wpAdminNotice.php

    r64347 r64440  
    3434         * @return array[]
    3535         */
    36         public function data_should_output_admin_notice() {
     36        public static function data_should_output_admin_notice() {
    3737                return array(
    3838                        'defaults'                                  => array(
  • trunk/tests/phpunit/tests/functions/wpArraySliceAssoc.php

    r57735 r64440  
    3232         * @return array[]
    3333         */
    34         public function data_wp_array_slice_assoc_arrays() {
     34        public static function data_wp_array_slice_assoc_arrays() {
    3535                return array(
    3636                        array(
  • trunk/tests/phpunit/tests/functions/wpCacheGetSalted.php

    r60697 r64440  
    7575         * @return array[] Data provider.
    7676         */
    77         public function data_wp_cache_get_salted_return_false() {
     77        public static function data_wp_cache_get_salted_return_false() {
    7878                return array(
    7979                        array( false ),
  • trunk/tests/phpunit/tests/functions/wpCheckAlternateFileNames.php

    r56971 r64440  
    2727         * @return array[]
    2828         */
    29         public function data_wp_check_alternate_file_names() {
     29        public static function data_wp_check_alternate_file_names() {
    3030                return array(
    3131                        'an existing file'                         => array(
  • trunk/tests/phpunit/tests/functions/wpCheckFiletype.php

    r57101 r64440  
    3131         * @return array[]
    3232         */
    33         public function data_wp_check_filetype() {
     33        public static function data_wp_check_filetype() {
    3434                return array(
    3535                        '.jpg filename and default allowed'       => array(
  • trunk/tests/phpunit/tests/functions/wpFilesize.php

    r62813 r64440  
    7474         * @return array<string, array{ 0: float|int|string }>
    7575         */
    76         public function data_wp_filesize_pre_wp_filesize_filter_negative(): array {
     76        public static function data_wp_filesize_pre_wp_filesize_filter_negative(): array {
    7777                return array(
    7878                        'negative int'            => array( -1 ),
    … …  
    9999         * @return array<string, array{ 0: mixed }>
    100100         */
    101         public function data_wp_filesize_filter_invalid_value(): array {
     101        public static function data_wp_filesize_filter_invalid_value(): array {
    102102                return array(
    103103                        'negative' => array( -1 ),
  • trunk/tests/phpunit/tests/functions/wpFuzzyNumberMatch.php

    r56971 r64440  
    3434         * }
    3535         */
    36         public function data_wp_fuzzy_number_match() {
     36        public static function data_wp_fuzzy_number_match() {
    3737                return array(
    3838                        'expected 1 int, actual 1 int'                => array(
  • trunk/tests/phpunit/tests/functions/wpGetAdminNotice.php

    r64347 r64440  
    3030         * @return array[]
    3131         */
    32         public function data_should_return_admin_notice() {
     32        public static function data_should_return_admin_notice() {
    3333                return array(
    3434                        'defaults'                                  => array(
    … …  
    318318         * @return array[]
    319319         */
    320         public function data_should_apply_filters() {
     320        public static function data_should_apply_filters() {
    321321                return array(
    322322                        'wp_admin_notice_args'   => array( 'hook_name' => 'wp_admin_notice_args' ),
  • trunk/tests/phpunit/tests/functions/wpGuessUrl.php

    r57735 r64440  
    2828         * @return array[]
    2929         */
    30         public function data_wp_guess_url_should_return_site_url() {
     30        public static function data_wp_guess_url_should_return_site_url() {
    3131                return array(
    3232                        'no trailing slash'                            => array( 'url' => 'wp-admin' ),
  • trunk/tests/phpunit/tests/functions/wpHash.php

    r59578 r64440  
    2121        }
    2222
    23         public function data_wp_hash_uses_specified_algorithm() {
     23        public static function data_wp_hash_uses_specified_algorithm() {
    2424                return array(
    2525                        array( 'md5', 32 ),
  • trunk/tests/phpunit/tests/functions/wpIsNumericArray.php

    r62524 r64440  
    2525         * @return array[]
    2626         */
    27         public function data_wp_is_numeric_array() {
     27        public static function data_wp_is_numeric_array() {
    2828                return array(
    2929                        'no index'                             => array(
  • trunk/tests/phpunit/tests/functions/wpListFilter.php

    r57735 r64440  
    2828         * @return array[]
    2929         */
    30         public function data_wp_list_filter() {
     30        public static function data_wp_list_filter() {
    3131                return array(
    3232                        'string instead of array'  => array(
  • trunk/tests/phpunit/tests/functions/wpListPluck.php

    r57735 r64440  
    222222         * @return array[]
    223223         */
    224         public function data_wp_list_pluck() {
     224        public static function data_wp_list_pluck() {
    225225                return array(
    226226                        'arrays'                         => array(
  • trunk/tests/phpunit/tests/functions/wpListSort.php

    r57735 r64440  
    2626         * @return array[]
    2727         */
    28         public function data_wp_list_sort() {
     28        public static function data_wp_list_sort() {
    2929                return array(
    3030                        'single orderby ascending'        => array(
    … …  
    356356         * @return array[]
    357357         */
    358         public function data_wp_list_sort_preserve_keys() {
     358        public static function data_wp_list_sort_preserve_keys() {
    359359                return array(
    360360                        'single orderby ascending'        => array(
  • trunk/tests/phpunit/tests/functions/wpListUtil.php

    r57735 r64440  
    9090         * @return array[]
    9191         */
    92         public function data_wp_list_util_pluck() {
     92        public static function data_wp_list_util_pluck() {
    9393                return array(
    9494                        'simple'        => array(
    … …  
    150150         * @return array[]
    151151         */
    152         public function data_wp_list_pluck_should_throw_doing_it_wrong_with_invalid_input() {
     152        public static function data_wp_list_pluck_should_throw_doing_it_wrong_with_invalid_input() {
    153153                return array(
    154154                        'int[] 0'                   => array( array( 0 ) ),
    … …  
    247247         * @return array[]
    248248         */
    249         public function data_wp_list_util_sort_string_arrays() {
     249        public static function data_wp_list_util_sort_string_arrays() {
    250250                return array(
    251251                        'string[], no keys, no ordering'     => array(
    … …  
    323323         * @return array[]
    324324         */
    325         public function data_wp_list_util_sort_int_arrays() {
     325        public static function data_wp_list_util_sort_int_arrays() {
    326326                return array(
    327327                        'int[], no keys, no ordering'     => array(
    … …  
    399399         * @return array[]
    400400         */
    401         public function data_wp_list_util_sort_arrays_of_arrays() {
     401        public static function data_wp_list_util_sort_arrays_of_arrays() {
    402402                return array(
    403403                        'array[], no keys, no ordering'     => array(
    … …  
    775775         * @return array[]
    776776         */
    777         public function data_wp_list_util_sort_object_arrays() {
     777        public static function data_wp_list_util_sort_object_arrays() {
    778778                return array(
    779779                        'object[], no keys, no ordering'     => array(
    … …  
    10081008         * @return array[]
    10091009         */
    1010         public function data_wp_list_util_sort_non_existent_orderby_fields() {
     1010        public static function data_wp_list_util_sort_non_existent_orderby_fields() {
    10111011                return array(
    10121012                        'int[], int keys, $orderby a non-existent field, $order = ASC and $preserve_keys = false' => array(
  • trunk/tests/phpunit/tests/functions/wpMysqlWeek.php

    r57987 r64440  
    3030         * @return array[]
    3131         */
    32         public function data_wp_mysql_week() {
     32        public static function data_wp_mysql_week() {
    3333                return array(
    3434                        array( '1969-12-25', 0, 'WEEK( col_name, 0 )' ),
  • trunk/tests/phpunit/tests/functions/wpNonceField.php

    r57735 r64440  
    4747         * @return array[]
    4848         */
    49         public function data_wp_nonce_field() {
     49        public static function data_wp_nonce_field() {
    5050                return array(
    5151                        'default'     => array(
  • trunk/tests/phpunit/tests/functions/wpNonceUrl.php

    r57735 r64440  
    4040         * @return array[]
    4141         */
    42         public function data_should_append_nonce_name_and_value() {
     42        public static function data_should_append_nonce_name_and_value() {
    4343                return array(
    4444                        'http:// and default action/name'             => array(
    … …  
    127127         * @return array[]
    128128         */
    129         public function data_should_handle_existing_query_args() {
     129        public static function data_should_handle_existing_query_args() {
    130130                return array(
    131131                        'one query arg'            => array(
  • trunk/tests/phpunit/tests/functions/wpParseIdList.php

    r63366 r64440  
    4040         * @return array<string, array{ input_list: mixed[]|string|int, expected: array<non-negative-int> }>
    4141         */
    42         public function data_wp_parse_id_list(): array {
     42        public static function data_wp_parse_id_list(): array {
    4343                return array(
    4444                        'regular'                  => array(
    … …  
    9595         * @return array<string, array{ input_list: mixed[]|string|int, expected: array<non-negative-int> }>
    9696         */
    97         public function data_unexpected_input(): array {
     97        public static function data_unexpected_input(): array {
    9898                return array(
    9999                        'string with commas' => array(
  • trunk/tests/phpunit/tests/functions/wpParseList.php

    r63366 r64440  
    3838         * @return array<string, array{ input_list: mixed[]|string|int, expected: array<scalar> }>
    3939         */
    40         public function data_wp_parse_list(): array {
     40        public static function data_wp_parse_list(): array {
    4141                return array(
    4242                        'ids only'            => array(
  • trunk/tests/phpunit/tests/functions/wpParseSlugList.php

    r63366 r64440  
    4040         * @return array<string, array{ input_list: mixed[]|string|int, expected: array<string> }>
    4141         */
    42         public function data_wp_parse_slug_list(): array {
     42        public static function data_wp_parse_slug_list(): array {
    4343                return array(
    4444                        'regular'                    => array(
    … …  
    108108         * @return array<string, array{ input_list: mixed[]|string|int, expected: array<string> }>
    109109         */
    110         public function data_unexpected_input(): array {
     110        public static function data_unexpected_input(): array {
    111111                return array(
    112112                        'string with commas' => array(
  • trunk/tests/phpunit/tests/functions/wpRefererField.php

    r57735 r64440  
    5151         * @return array[]
    5252         */
    53         public function data_wp_referer_field_should_respect_display_arg() {
     53        public static function data_wp_referer_field_should_respect_display_arg() {
    5454                return array(
    5555                        'true'         => array( true ),
  • trunk/tests/phpunit/tests/functions/wpTimezoneChoice.php

    r63640 r64440  
    3838         * @return array<string, array{ 0: string }>
    3939         */
    40         public function data_wp_timezone_choice(): array {
     40        public static function data_wp_timezone_choice(): array {
    4141                return array(
    4242                        'placeholder option'           => array( '<option selected="selected" value="">Select a city</option>' ),
    … …  
    7171         * @return array<string, array{ 0: string }>
    7272         */
    73         public function data_wp_timezone_choice_selected(): array {
     73        public static function data_wp_timezone_choice_selected(): array {
    7474                return array(
    7575                        'city from the list'                   => array(
    … …  
    110110         * @return array<string, array{ 0: string }>
    111111         */
    112         public function data_wp_timezone_choice_es(): array {
     112        public static function data_wp_timezone_choice_es(): array {
    113113                return array(
    114114                        'placeholder remains in English (no translation override passed)' => array( '<option selected="selected" value="">Select a city</option>' ),
  • trunk/tests/phpunit/tests/functions/wpTimezoneChoiceUsortCallback.php

    r57278 r64440  
    2121        }
    2222
    23         public function data_wp_timezone_choice_usort_callback() {
     23        public static function data_wp_timezone_choice_usort_callback() {
    2424                return array(
    2525                        'just GMT+'                         => array(
  • trunk/tests/phpunit/tests/functions/wpTimezoneOverrideOffset.php

    r59959 r64440  
    2828         * }
    2929         */
    30         public function data_wp_timezone_override_offset() {
     30        public static function data_wp_timezone_override_offset() {
    3131                return array(
    3232                        'no timezone string option set' => array( '', false ),
    … …  
    3434                        'UTC option set'                => array( 'UTC', 0.0 ),
    3535                        'EST option set'                => array( 'EST', -5.0 ),
    36                         'NST option set'                => array( 'America/St_Johns', $this->is_timezone_in_dst( 'America/St_Johns' ) ? -2.5 : -3.5 ),
     36                        'NST option set'                => array( 'America/St_Johns', self::is_timezone_in_dst( 'America/St_Johns' ) ? -2.5 : -3.5 ),
    3737                );
    3838        }
    … …  
    4444         * @return bool Whether the timezone is observing DST.
    4545         */
    46         private function is_timezone_in_dst( $timezone_string ) {
     46        private static function is_timezone_in_dst( $timezone_string ) {
    4747                $timezone    = new DateTimeZone( $timezone_string );
    4848                $timestamp   = time();
  • trunk/tests/phpunit/tests/functions/wpToKebabCase.php

    r56971 r64440  
    3434         * }
    3535         */
    36         public function data_wp_to_kebab_case() {
     36        public static function data_wp_to_kebab_case() {
    3737                return array(
    3838                        array( 'white', 'white' ),
  • trunk/tests/phpunit/tests/functions/wpTriggerError.php

    r64233 r64440  
    8181         * @return array[]
    8282         */
    83         public function data_should_trigger_error() {
     83        public static function data_should_trigger_error() {
    8484                return array(
    8585                        'function name and message are given'          => array(
  • trunk/tests/phpunit/tests/functions/wpUniqueIdFromValues.php

    r60113 r64440  
    7474         * @return array[]
    7575         */
    76         public function data_wp_unique_id_from_values() {
     76        public static function data_wp_unique_id_from_values() {
    7777                return array(
    7878                        'string'          => array( array( 'value' => 'text' ) ),
    … …  
    142142         * @return array[]
    143143         */
    144         public function data_wp_unique_id_from_values_invalid_data() {
     144        public static function data_wp_unique_id_from_values_invalid_data() {
    145145                return array(
    146146                        'string'  => array( 'text' ),
  • trunk/tests/phpunit/tests/functions/wpUniquePrefixedId.php

    r57057 r64440  
    3939         * @return array[]
    4040         */
    41         public function data_should_create_unique_prefixed_ids() {
     41        public static function data_should_create_unique_prefixed_ids() {
    4242                return array(
    4343                        'prefix as empty string'       => array(
    … …  
    104104         * @return array[]
    105105         */
    106         public function data_should_raise_notice_and_use_empty_string_prefix_when_nonstring_given() {
     106        public static function data_should_raise_notice_and_use_empty_string_prefix_when_nonstring_given() {
    107107                $message = 'wp_unique_prefixed_id(): The prefix must be a string. "%s" data type given.';
    108108                return array(
    … …  
    178178         * @return array[]
    179179         */
    180         public function data_same_prefixes_should_generate_unique_ids() {
     180        public static function data_same_prefixes_should_generate_unique_ids() {
    181181                return array(
    182182                        'prefixes = empty string' => array(
  • trunk/tests/phpunit/tests/functions/wpValidateBoolean.php

    r56971 r64440  
    3333         * }
    3434         */
    35         public function data_wp_validate_boolean() {
     35        public static function data_wp_validate_boolean() {
    3636                $std = new \stdClass();
    3737
Note: See TracChangeset for help on using the changeset viewer.