Tests: Backport two changes from PHPUnit 9.3:

* Replace the `Match` interface with `ParametersMatch`, to avoid parse errors due to `match` being a reserved keyword in PHP 8.
* Replace `ReflectionParameter::getClass()` usage, which is deprecated in PHP 8.

This allows tests relying on the `getMockForAbstractClass()` and `getMockBuilder()` methods to run again on PHP 8.

When the test suite is updated for compatibility with PHPUnit 9.x, these overrides can be removed.

Follow-up to [48972].

See #50913, #50902.

git-svn-id: https://develop.svn.wordpress.org/trunk@49037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-09-23 13:52:02 +00:00
parent 7d15225ad0
commit c31a551273
21 changed files with 892 additions and 61 deletions
+1
View File
@@ -134,6 +134,7 @@
<exclude-pattern>/src/wp-includes/sodium_compat/*</exclude-pattern>
<exclude-pattern>/src/wp-includes/Text/*</exclude-pattern>
<exclude-pattern>/tests/phpunit/includes/phpunit7/MockObject/*</exclude-pattern>
<exclude-pattern>/tests/phpunit/includes/speed-trap-listener\.php</exclude-pattern>
<!-- Test data and fixtures. -->