Make WordPress Core

Changeset 55756


Ignore:
Timestamp:
05/14/2023 06:43:46 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Tests: Remove expectation of a deprecation notice from WP_Posts_List_Table tests.

With get_the_author() returning an empty string instead of null if called before $authordata is set, and no longer causing a PHP 8.1 "null to non-nullable" deprecation notice, there is no need for these tests to ignore the notice.

Follow-up to [51968], [55755].

See #58157.

File:
1 edited

Legend:

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

    r54889 r55756  
    204204     */
    205205    protected function _test_list_hierarchical_page( array $args, array $expected_ids ) {
    206         if ( PHP_VERSION_ID >= 80100 ) {
    207             /*
    208              * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
    209              * via hooked in filter functions until a more structural solution to the
    210              * "missing input validation" conundrum has been architected and implemented.
    211              */
    212             $this->expectDeprecation();
    213             $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
    214         }
    215 
    216206        $matches = array();
    217207
Note: See TracChangeset for help on using the changeset viewer.