Make WordPress Core


Ignore:
Timestamp:
06/11/2024 12:36:13 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Administration: Remove redundant type casting in WP_List_Table::search_box().

Scalar values passed to esc_attr() are already converted internally to a string via both wp_check_invalid_utf8() and _wp_specialchars().

Includes adding @covers tags for unit tests.

Follow-up to [58379].

See #58379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/wpListTable.php

    r58379 r58389  
    142142
    143143    /**
    144      * Tests the "get_views_links()" method.
     144     * Tests the `WP_List_Table::get_views_links()` method.
    145145     *
    146146     * @ticket 42066
     
    256256
    257257    /**
    258      * Tests that "get_views_links()" throws a _doing_it_wrong().
     258     * Tests that `WP_List_Table::get_views_links()` throws a `_doing_it_wrong()`.
    259259     *
    260260     * @ticket 42066
     
    524524
    525525    /**
    526      * Tests that "search_box()" works correctly with an orderby array with multiple values.
     526     * Tests that `WP_List_Table::search_box()` works correctly with an `orderby` array with multiple values.
    527527     *
    528528     * @ticket 59494
     529     *
     530     * @covers WP_List_Table::search_box()
    529531     */
    530532    public function test_search_box_working_with_array_of_orderby_multiple_values() {
     
    545547
    546548    /**
    547      * Tests that "search_box()" works correctly with an orderby array with a single value.
     549     * Tests that `WP_List_Table::search_box()` works correctly with an `orderby` array with a single value.
    548550     *
    549551     * @ticket 59494
     552     *
     553     * @covers WP_List_Table::search_box()
    550554     */
    551555    public function test_search_box_working_with_array_of_orderby_single_value() {
     
    564568
    565569    /**
    566      * Tests that "search_box()" works correctly with orderby set to a string.
     570     * Tests that `WP_List_Table::search_box()` works correctly with `orderby` set to a string.
    567571     *
    568572     * @ticket 59494
     573     *
     574     * @covers WP_List_Table::search_box()
    569575     */
    570576    public function test_search_box_works_with_orderby_string() {
Note: See TracChangeset for help on using the changeset viewer.