#61148 closed task (blessed) (fixed)
Standardise assertions for remote HTTP tests
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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_Errormessage 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.
2 years ago
#1
- Keywords has-patch has-unit-tests added
@johnbillion commented on PR #6503:
2 years ago
#3
Note: See
TracTickets for help on using
tickets.
In 58108: