[wp-trac] [WordPress Trac] #60426: Update WP_Test_REST_TestCase::assertErrorResponse() to allow custom failure messages
WordPress Trac
noreply at wordpress.org
Tue Apr 23 18:55:42 UTC 2024
#60426: Update WP_Test_REST_TestCase::assertErrorResponse() to allow custom failure
messages
-------------------------------------------------+-------------------------
Reporter: antonvlasenko | Owner:
| SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.6
Component: Build/Test Tools | Version:
Severity: trivial | Resolution: fixed
Keywords: good-first-bug has-patch has-unit- | Focuses: coding-
tests | standards
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"58039" 58039]:
{{{
#!CommitTicketReference repository="" revision="58039"
Tests: Add a `$message` parameter for a custom assertion in
`WP_Test_REST_TestCase`.
All assertions in PHPUnit have a `$message` parameter. Setting this
parameter allows to distinguish which assertion is failing when a test
runs multiple assertions, making debugging of the tests easier.
This optional parameter is now added for
`WP_Test_REST_TestCase::assertErrorResponse()`.
Follow-up to [34928], [51478].
Props mykolashlyakhtun, antonvlasenko, swissspidy, SergeyBiryukov.
Fixes #60426.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60426#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list