diff options
author | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2021-05-25 01:07:43 +0000 |
---|---|---|
committer | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2021-05-25 01:07:43 +0000 |
commit | d80fdbca3bbfac922fca104b4334e1f2132328c2 (patch) | |
tree | af8c945f96f547cac3e6a9c1bf4c062d952b04eb /tests/phpunit/includes/phpunit6 | |
parent | 94e04b791781a8d80238d40b39995b416c8925fe (diff) | |
download | wordpress-d80fdbca3bbfac922fca104b4334e1f2132328c2.tar.gz wordpress-d80fdbca3bbfac922fca104b4334e1f2132328c2.zip |
Tests: Minimize the chances of signature conflicts for `assertEqualsWithDelta()`.
The PHPUnit 7.5+ method `assertEqualsWithDelta()` was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.
This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the `IsEqual()` class alias declaration, no longer needed.
Follow-up to [48952].
Props jrf.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50986 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, 0 insertions, 1 deletions
diff --git a/tests/phpunit/includes/phpunit6/compat.php b/tests/phpunit/includes/phpunit6/compat.php index 61aa6048e9..dcc99e9a76 100644 --- a/tests/phpunit/includes/phpunit6/compat.php +++ b/tests/phpunit/includes/phpunit6/compat.php @@ -11,7 +11,6 @@ if ( class_exists( 'PHPUnit\Runner\Version' ) && version_compare( PHPUnit\Runner class_alias( 'PHPUnit\Framework\Test', 'PHPUnit_Framework_Test' ); class_alias( 'PHPUnit\Framework\Warning', 'PHPUnit_Framework_Warning' ); class_alias( 'PHPUnit\Framework\AssertionFailedError', 'PHPUnit_Framework_AssertionFailedError' ); - class_alias( 'PHPUnit\Framework\Constraint\IsEqual', 'PHPUnit_Framework_Constraint_IsEqual' ); class_alias( 'PHPUnit\Framework\TestSuite', 'PHPUnit_Framework_TestSuite' ); class_alias( 'PHPUnit\Framework\TestListener', 'PHPUnit_Framework_TestListener' ); class_alias( 'PHPUnit\Util\GlobalState', 'PHPUnit_Util_GlobalState' ); |