elementor / elementor/wp2static
Mock external requests in sitemap tests
Open
enhancement
hacktoberfest
- Dominant language
- PHP
- Stars
- 1.5k
- Forks
- 294
- PR merge metrics
- No merged PRs in 30d
Description
As a developer
I don't want to wait for slow network requests to run test suite
So that I don't avoid running them frequently and they aren't susceptible to side effects
Currently, running `composer test` takes too long due to fetching external resources in the sitemap tests.
We should use local test data to simulate the responses we see from current external resources.
Sitemap test scope should at least cover:
- dealing with valid sitemap responses
- dealing with invalid sitemap responses
- dealing with network errors (3xx, 4xx, 5xx)
Contributor guide
Assessment
This issue has not been assessed yet.