mirror of
git://develop.git.wordpress.org/
synced 2025-04-11 15:42:03 +02:00
Adds an expectation for PHP 8.1 "passing null to non-nullable" deprecation notice to select tests where the deprecation is generated by one of the functions in the `wp-includes/formatting.php` file, either via a filter hook callback or by a direct call. Instead of haphazardly fixing these issues exposed by the tests, a more structural and all-encompassing solution for input validation should be architected and implemented as otherwise, we'll keep running into similar issues time and again with each new PHP version. To discourage people from "fixing" these issues now anyway, this commit "hides" nearly all of these issues from the test runs. Once a more structural solution is designed, these tests and the underlying functions causing the deprecation notices should be revisited and the structural solution put in place. Includes a few minor other tweaks to select tests: * Removing a stray `return` (twice) from assertion statements. * Removing calls to `ob_*()` functions in favour of letting PHPUnit manage the output catching. This prevents warnings along the lines of `Test code or tested code did not (only) close its own output buffers`. Props jrf, hellofromTonya. See #53635. git-svn-id: https://develop.svn.wordpress.org/trunk@51968 602fd350-edb4-49c9-b593-d223f7449a82