#61148 closed task (blessed) (fixed)
Standardise assertions for remote HTTP tests
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 6.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
The order of assertions for remote HTTP request tests aren't entirely consistent, which can be a problem when an HTTP request fails and you see a test-specific assertion failure instead of information about why the request failed.
For every HTTP request test where the request is expected to succeed, the order should be:
skipTestOnTimeout()
so timeouts don't cause the test to failassertNotWPError()
so if the request results in an error then the fullWP_Error
message gets output- HTTP status code assertions, if necessary
- All other assertions
Change History (3)
This ticket was mentioned in PR #6503 on WordPress/wordpress-develop by @johnbillion.
5 months ago
#1
- Keywords has-patch has-unit-tests added
#2
@
5 months ago
- Owner set to johnbillion
- Resolution set to fixed
- Status changed from new to closed
@johnbillion commented on PR #6503:
5 months ago
#3
Note: See
TracTickets for help on using
tickets.
In 58108: