From 002a3e38dd9e2bfa4a8dae9e27ce873c50541508 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 14 May 2023 18:43:46 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@55756 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/wpPostsListTable.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/phpunit/tests/admin/wpPostsListTable.php b/tests/phpunit/tests/admin/wpPostsListTable.php index c2dd5f586a..4b2dfe6e0a 100644 --- a/tests/phpunit/tests/admin/wpPostsListTable.php +++ b/tests/phpunit/tests/admin/wpPostsListTable.php @@ -203,16 +203,6 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase { * @param array $expected_ids Expected IDs of pages returned. */ protected function _test_list_hierarchical_page( array $args, array $expected_ids ) { - if ( PHP_VERSION_ID >= 80100 ) { - /* - * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in - * via hooked in filter functions until a more structural solution to the - * "missing input validation" conundrum has been architected and implemented. - */ - $this->expectDeprecation(); - $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); - } - $matches = array(); $_REQUEST['paged'] = $args['paged'];