Opened 8 years ago
Closed 8 years ago
#37090 closed enhancement (fixed)
Unit test for wp_get_http_headers
Reported by: | borgesbruno | Owned by: | rmccue |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | HTTP API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description (last modified by )
I've wrote some tests to improve the code coverage, this special one needs to do an external request to get the headers and check whether is a valid or not response header.
This is the second ticket regarded about this duty, the first one is in #37073, following the @rmccue recommendation I've created a new ticket only with the tests
Attachments (2)
Change History (11)
#2
@
8 years ago
- Component changed from General to HTTP API
- Milestone changed from Awaiting Review to 4.6
- Owner set to rmccue
- Status changed from new to reviewing
#5
@
8 years ago
@jipmoors That's a known issue due to some changes to the trac database yesterday. You should be able to upload it soon-ish.
#6
@
8 years ago
These acceptance and unit tests can be complementary.
I can understand internals would be changed at some point so unit tests would fail, so I am thinking about writing unit tests to cover the WP_Http class, which is used to supply the actual fetching functionality.
#7
@
8 years ago
This is also a good approach @jipmoors use a mock instead of a real http request, like you said can be complementary
I have created a new patch which has unit tests instead of acceptance tests, but I'm having some problems uploading it due to some
OperationalError: database is locked
issue.