[wp-trac] [WordPress Trac] #59486: Make test suite compatible with PHPUnit 10
WordPress Trac
noreply at wordpress.org
Wed Jan 3 14:46:23 UTC 2024
#59486: Make test suite compatible with PHPUnit 10
------------------------------+-----------------------------
Reporter: dingo_d | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version: 6.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
------------------------------+-----------------------------
Changes (by desrosj):
* keywords: dev-feedback needs-testing => needs-patch
* milestone: Awaiting Review => Future Release
Comment:
I went through and made a preliminary list by looking at the
[https://github.com/sebastianbergmann/phpunit/blob/10.0.0/ChangeLog-10.0.md#removed
removed section within the 10.0 changelog] and searching the `test`
directory for occurrences of removed elements. The following have been
removed and are found in the `test` directory:
- `withConsecutive()`
([https://github.com/sebastianbergmann/phpunit/issues/4564 details])
- `MockBuilder::setMethods()` and `MockBuilder::setMethodsExcept()`
([https://github.com/sebastianbergmann/phpunit/issues/3769 details])
- `expectDeprecation()`, `expectDeprecationMessage()`, and
`expectDeprecationMessageMatches()` methods
- `expectError()`, `expectErrorMessage()`, and
`expectErrorMessageMatches()` methods
- `expectNotice()`, `expectNoticeMessage()`, and
`expectNoticeMessageMatches()` methods
- `expectWarning()`, `expectWarningMessage()`, and
`expectWarningMessageMatches()` methods
This is by no means an all inclusive list. But wanted to provide a
starting point if someone wanted to try and tackle this.
To run the test suite, the `yoast/phpunit-polyfills` version constraint
needs to be updated to `^2.0.0` in the `composer.json` file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59486#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list