Opened 4 years ago
Closed 4 years ago
#50986 closed defect (bug) (fixed)
PHPUnit tests: unregister custom settings after rest-api tests
Reported by: | david.binda | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | minor | Version: | 4.7 |
Component: | REST API | Keywords: | |
Focuses: | Cc: |
Description
Most of the tests in tests/phpunit/tests/rest-api/rest-settings-controller.php
are removing the settings they after performing the assertions.
However, not all of them do, which means that those settings may be leaking to other tests. This is not breaking any tests at the moment, but may cause issues when the order of the tests changes.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Thanks for the patch @davidbinda!
Could we move all the unregister_setting calls to
tearDown
? That way we can guarantee they get executed if an assertion fails?