Opened 7 years ago
Last modified 2 years ago
#41463 accepted enhancement
Improve REST API tests that don't perform any assertions
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | needs-unit-tests needs-refresh |
Focuses: | rest-api | Cc: |
Description
There are a bunch of REST API tests that don't perform any assertions. This creates noise in the test results as they get marked as risky tests.
These tests are present because their test class extends the abstract WP_Test_REST_Controller_Testcase
class, which requires several methods to be implemented which don't make sense for all REST API routes.
These tests can be improved so they do actually perform assertions related to their behaviour.
Attachments (1)
Change History (12)
This ticket was mentioned in Slack in #core-restapi by spacedmonkey. View the logs.
3 years ago
#7
@
3 years ago
- Keywords needs-refresh added
The latest patch is from 4 years ago, making this ticket as needs a refresh.
#8
@
3 years ago
- Keywords needs-refresh removed
Some time has passed and pulling a fresh list of tests with 0 assertions could be useful here. A fresh (as of today) PHPUnit report is available here:
https://github.com/WordPress/wordpress-develop/runs/3887182312
In 41176: