Make WordPress Core

Changeset 57735


Ignore:
Timestamp:
02/28/2024 09:44:40 AM (4 months ago)
Author:
swissspidy
Message:

Tests: Address capitalization and docblock inconsistencies in some test class names.

Follow-up to [57060], [57718], [57725], [57726], [57727], [57728], [57733].

Props swissspidy, costdev.
See #59647.

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

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/maybeHashHexColor.php

    r57733 r57735  
    88 * @covers ::maybe_hash_hex_color
    99 */
    10 class Tests_Formatting_maybeHashHexColor extends WP_UnitTestCase {
     10class Tests_Formatting_MaybeHashHexColor extends WP_UnitTestCase {
    1111
    1212    /**
    1313     * @ticket 60272
    1414     *
    15      * @dataProvider date_sanitize_hex_color_no_hash
     15     * @dataProvider data_sanitize_hex_color_no_hash
     16     *
     17     * @param string $color    Color.
     18     * @param string $expected Expected.
    1619     */
    1720    public function test_maybe_hash_hex_color( $color, $expected ) {
     
    2023
    2124    /**
    22      * @return array
     25     * Data provider for test_maybe_hash_hex_color().
     26     *
     27     * @return array[]
    2328     */
    24     public function date_sanitize_hex_color_no_hash() {
     29    public function data_sanitize_hex_color_no_hash() {
    2530        return array(
    2631            '$maybe_alpha = false, 3 digit'               => array(
  • trunk/tests/phpunit/tests/formatting/redirect.php

    r55562 r57735  
    204204
    205205    /**
    206      * Data provider for test_wp_validate_redirect_relative_url.
     206     * Data provider for test_wp_validate_redirect_relative_url().
    207207     *
    208208     * @return array[] {
  • trunk/tests/phpunit/tests/formatting/sanitizeHexColor.php

    r57733 r57735  
    88 * @covers ::sanitize_hex_color
    99 */
    10 class Tests_Formatting_sanitizeHexColor extends WP_UnitTestCase {
     10class Tests_Formatting_SanitizeHexColor extends WP_UnitTestCase {
    1111
    1212    /**
    1313     * @ticket 60270
    1414     *
    15      * @dataProvider date_sanitize_hex_color
     15     * @dataProvider data_sanitize_hex_color
     16     *
     17     * @param string $color    Color.
     18     * @param string $expected Expected.
    1619     */
    1720    public function test_sanitize_hex_color( $color, $expected ) {
     
    2023
    2124    /**
    22      * @return array
     25     * Data provider for test_sanitize_hex_color().
     26     *
     27     * @return array[]
    2328     */
    24     public function date_sanitize_hex_color() {
     29    public function data_sanitize_hex_color() {
    2530        return array(
    2631            '$maybe_alpha = false, 3 digit'               => array(
  • trunk/tests/phpunit/tests/formatting/sanitizeHexColorNoHash.php

    r57733 r57735  
    88 * @covers ::sanitize_hex_color_no_hash
    99 */
    10 class Tests_Formatting_sanitizeHexColorNoHash extends WP_UnitTestCase {
     10class Tests_Formatting_SanitizeHexColorNoHash extends WP_UnitTestCase {
    1111
    1212    /**
    1313     * @ticket 60271
    1414     *
    15      * @dataProvider date_sanitize_hex_color_no_hash
     15     * @dataProvider data_sanitize_hex_color_no_hash
     16     *
     17     * @param string $color    Color.
     18     * @param string $expected Expected.
    1619     */
    1720    public function test_sanitize_hex_color_no_hash( $color, $expected ) {
     
    2023
    2124    /**
    22      * @return array
     25     * Data provider for data_sanitize_hex_color_no_hash().
     26     *
     27     * @return array[]
    2328     */
    24     public function date_sanitize_hex_color_no_hash() {
     29    public function data_sanitize_hex_color_no_hash() {
    2530        return array(
    2631            '$maybe_alpha = false, 3 digit'               => array(
  • trunk/tests/phpunit/tests/formatting/wpStripAllTags.php

    r56536 r57735  
    8787
    8888    /**
    89      * Data provider for test_wp_strip_all_tags_should_cast_scalar_values_to_string()/
     89     * Data provider for test_wp_strip_all_tags_should_cast_scalar_values_to_string().
    9090     *
    9191     * @return array[]
  • trunk/tests/phpunit/tests/functions/absint.php

    r57724 r57735  
    44 * Tests for the absint function.
    55 *
    6  * @group Functions
     6 * @group functions
    77 *
    88 * @covers ::absint
     
    2525     * Returns an array of test data for the `data_absint` method.
    2626     *
    27      * @return array An array of test data.
     27     * @return array[] An array of test data.
    2828     */
    2929    public function data_absint() {
  • trunk/tests/phpunit/tests/functions/addMagicQuotes.php

    r56971 r57735  
    2222
    2323    /**
    24      * Data provider for test_add_magic_quotes.
     24     * Data provider for test_add_magic_quotes().
    2525     *
    2626     * @return array[] Test parameters {
  • trunk/tests/phpunit/tests/functions/allowedProtocols.php

    r56971 r57735  
    3737
    3838    /**
     39     * Data provider.
     40     *
    3941     * @link http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
     42     *
     43     * @return array[]
    4044     */
    4145    public function data_example_urls() {
  • trunk/tests/phpunit/tests/functions/getStatusHeaderDesc.php

    r56971 r57735  
    2525     * Data provider for test_get_status_header_desc().
    2626     *
    27      * @return array
     27     * @return array[]
    2828     */
    2929    public function data_get_status_header_desc() {
  • trunk/tests/phpunit/tests/functions/isNewDay.php

    r56971 r57735  
    2828    }
    2929
     30    /**
     31     * Data provider.
     32     *
     33     * @return array[]
     34     */
    3035    public function data_is_new_date() {
    3136        return array(
  • trunk/tests/phpunit/tests/functions/isPhpVersionCompatible.php

    r56971 r57735  
    2626     * Data provider.
    2727     *
    28      * @return array
     28     * @return array[]
    2929     */
    3030    public function data_is_php_version_compatible() {
  • trunk/tests/phpunit/tests/functions/isSerialized.php

    r57278 r57735  
    2626     * Data provider for `test_is_serialized()`.
    2727     *
    28      * @return array
     28     * @return array[]
    2929     */
    3030    public function data_is_serialized() {
     
    9898     * Data provider for `test_is_serialized()`.
    9999     *
    100      * @return array
     100     * @return array[]
    101101     */
    102102    public function data_is_not_serialized() {
     
    193193    }
    194194
     195    /**
     196     * Data provider.
     197     *
     198     * @return array[]
     199     */
    195200    public function data_is_serialized_should_return_true_for_large_floats() {
    196201        return array(
  • trunk/tests/phpunit/tests/functions/isSerializedString.php

    r56971 r57735  
    2525     * Data provider for `test_is_serialized_string()`.
    2626     *
    27      * @return array
     27     * @return array[]
    2828     */
    2929    public function data_is_serialized_string() {
  • trunk/tests/phpunit/tests/functions/isWpVersionCompatible.php

    r57707 r57735  
    2626     * Data provider.
    2727     *
    28      * @return array
     28     * @return array[]
    2929     */
    3030    public function data_is_wp_version_compatible() {
     
    126126     * Data provider.
    127127     *
    128      * @return array
     128     * @return array[]
    129129     */
    130130    public function data_is_wp_version_compatible_should_gracefully_handle_trailing_point_zero_version_numbers() {
     
    205205     * Data provider.
    206206     *
    207      * @return array
     207     * @return array[]
    208208     */
    209209    public function data_is_wp_version_compatible_with_development_versions() {
  • trunk/tests/phpunit/tests/functions/maybeSerialize.php

    r56971 r57735  
    5454     * Data provider for `test_maybe_unserialize()`.
    5555     *
    56      * @return array
     56     * @return array[]
    5757     */
    5858    public function data_is_serialized() {
     
    122122     * Data provider for `test_maybe_serialize()`.
    123123     *
    124      * @return array
     124     * @return array[]
    125125     */
    126126    public function data_is_not_serialized() {
     
    230230     * Data provider for test_deserialize_request_utility_filtered_iterator_objects().
    231231     *
    232      * @return array
     232     * @return array[]
    233233     */
    234234    public function data_serialize_deserialize_objects() {
  • trunk/tests/phpunit/tests/functions/mceSetDirection.php

    r57733 r57735  
    88 * @covers ::_mce_set_direction
    99 */
    10 class Tests_Functions_mceSetDirection extends WP_UnitTestCase {
     10class Tests_Functions_MceSetDirection extends WP_UnitTestCase {
    1111
    1212    /**
     
    3131
    3232        $actual = _mce_set_direction( $mce_init );
    33         $this->assertSameSets( $mce_init, $actual );
     33        $this->assertSameSets( $mce_init, $actual, 'An unexpected LTR result was returned.' );
    3434
    3535        $orig_text_dir             = $wp_locale->text_direction;
     
    3838        $wp_locale->text_direction = $orig_text_dir;
    3939
    40         $this->assertSameSets( $expected, $actual );
     40        $this->assertSameSets( $expected, $actual, 'An unexpected RTL result was returned.' );
    4141    }
    4242}
  • trunk/tests/phpunit/tests/functions/removeQueryArg.php

    r56971 r57735  
    1818    }
    1919
     20    /**
     21     * Data provider.
     22     *
     23     * @return array[]
     24     */
    2025    public function data_remove_query_arg() {
    2126        return array(
  • trunk/tests/phpunit/tests/functions/sizeFormat.php

    r56971 r57735  
    1414class Tests_Functions_SizeFormat extends WP_UnitTestCase {
    1515
     16    /**
     17     * Data provider.
     18     *
     19     * @return array[]
     20     */
    1621    public function data_size_format() {
    1722        return array(
  • trunk/tests/phpunit/tests/functions/wpArraySliceAssoc.php

    r56971 r57735  
    3030     * Data provider for wp_array_slice_assoc().
    3131     *
    32      * @return array
     32     * @return array[]
    3333     */
    3434    public function data_wp_array_slice_assoc_arrays() {
  • trunk/tests/phpunit/tests/functions/wpGuessUrl.php

    r56971 r57735  
    2626     * Data provider.
    2727     *
    28      * @return array
     28     * @return array[]
    2929     */
    3030    public function data_wp_guess_url_should_return_site_url() {
  • trunk/tests/phpunit/tests/functions/wpListFilter.php

    r56971 r57735  
    2323    }
    2424
     25    /**
     26     * Data provider.
     27     *
     28     * @return array[]
     29     */
    2530    public function data_wp_list_filter() {
    2631        return array(
  • trunk/tests/phpunit/tests/functions/wpListPluck.php

    r57732 r57735  
    217217    }
    218218
     219    /**
     220     * Data provider.
     221     *
     222     * @return array[]
     223     */
    219224    public function data_wp_list_pluck() {
    220225        return array(
  • trunk/tests/phpunit/tests/functions/wpListSort.php

    r56971 r57735  
    2121    }
    2222
     23    /**
     24     * Data provider.
     25     *
     26     * @return array[]
     27     */
    2328    public function data_wp_list_sort() {
    2429        return array(
     
    346351    }
    347352
     353    /**
     354     * Data provider.
     355     *
     356     * @return array[]
     357     */
    348358    public function data_wp_list_sort_preserve_keys() {
    349359        return array(
  • trunk/tests/phpunit/tests/functions/wpListUtil.php

    r56971 r57735  
    148148     * Data provider that provides invalid input arrays.
    149149     *
    150      * @return array
     150     * @return array[]
    151151     */
    152152    public function data_wp_list_pluck_should_throw_doing_it_wrong_with_invalid_input() {
  • trunk/tests/phpunit/tests/functions/wpNonceField.php

    r56971 r57735  
    4545     * Data provider.
    4646     *
    47      * @return array
     47     * @return array[]
    4848     */
    4949    public function data_wp_nonce_field() {
  • trunk/tests/phpunit/tests/functions/wpNonceUrl.php

    r56971 r57735  
    3838     * Data provider for test_should_append_nonce_name_and_value().
    3939     *
    40      * @return array
     40     * @return array[]
    4141     */
    4242    public function data_should_append_nonce_name_and_value() {
     
    125125     * Data provider for test_should_handle_existing_query_args().
    126126     *
    127      * @return array
     127     * @return array[]
    128128     */
    129129    public function data_should_handle_existing_query_args() {
  • trunk/tests/phpunit/tests/functions/wpParseList.php

    r57284 r57735  
    1818    }
    1919
     20    /**
     21     * Data provider.
     22     *
     23     * @return array[]
     24     */
    2025    public function data_wp_parse_list() {
    2126        return array(
  • trunk/tests/phpunit/tests/functions/wpParseSlugList.php

    r57733 r57735  
    88 * @covers ::wp_parse_slug_list
    99 */
    10 class Tests_Functions_wpParseSlugList extends WP_UnitTestCase {
     10class Tests_Functions_WpParseSlugList extends WP_UnitTestCase {
    1111
    1212    /**
  • trunk/tests/phpunit/tests/functions/wpRefererField.php

    r56971 r57735  
    4949     * Data provider for test_wp_referer_field_should_respect_display_arg().
    5050     *
    51      * @return array
     51     * @return array[]
    5252     */
    5353    public function data_wp_referer_field_should_respect_display_arg() {
  • trunk/tests/phpunit/tests/functions/wpTriggerError.php

    r56971 r57735  
    7979     * Data provider.
    8080     *
    81      * @return array
     81     * @return array[]
    8282     */
    8383    public function data_should_trigger_error() {
Note: See TracChangeset for help on using the changeset viewer.