diff options
author | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2019-11-01 00:39:04 +0000 |
---|---|---|
committer | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2019-11-01 00:39:04 +0000 |
commit | 89621877f823c1246e1b93ddcd32b68870e71114 (patch) | |
tree | 27fc42d075d105cc5075cc11d0170367a66da419 /tests/phpunit/includes/phpunit6 | |
parent | 3623ab0ad81156607379466e8945fa344d118074 (diff) | |
download | wordpress-89621877f823c1246e1b93ddcd32b68870e71114.tar.gz wordpress-89621877f823c1246e1b93ddcd32b68870e71114.zip |
Code Modernization: Pass an appropriate error level to `trigger_error()` in `_doing_it_wrong()` and related functions:
* `_deprecated_function()`
* `_deprecated_argument()`
* `_deprecated_constructor()`
* `_deprecated_file()`
The error level passed is `E_USER_DEPRECATED` for the deprecated function group and `E_USER_NOTICE` for `_doing_it_wrong()`.
Props jrf.
Fixes #36561.
git-svn-id: https://develop.svn.wordpress.org/trunk@46625 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tests/phpunit/includes/phpunit6')
-rw-r--r-- | tests/phpunit/includes/phpunit6/compat.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/phpunit/includes/phpunit6/compat.php b/tests/phpunit/includes/phpunit6/compat.php index de9b0bccac..dcc99e9a76 100644 --- a/tests/phpunit/includes/phpunit6/compat.php +++ b/tests/phpunit/includes/phpunit6/compat.php @@ -5,6 +5,7 @@ if ( class_exists( 'PHPUnit\Runner\Version' ) && version_compare( PHPUnit\Runner class_alias( 'PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' ); class_alias( 'PHPUnit\Framework\Exception', 'PHPUnit_Framework_Exception' ); class_alias( 'PHPUnit\Framework\ExpectationFailedException', 'PHPUnit_Framework_ExpectationFailedException' ); + class_alias( 'PHPUnit\Framework\Error\Deprecated', 'PHPUnit_Framework_Error_Deprecated' ); class_alias( 'PHPUnit\Framework\Error\Notice', 'PHPUnit_Framework_Error_Notice' ); class_alias( 'PHPUnit\Framework\Error\Warning', 'PHPUnit_Framework_Error_Warning' ); class_alias( 'PHPUnit\Framework\Test', 'PHPUnit_Framework_Test' ); |