elementor / elementor/wp2static

Mock external requests in sitemap tests

Open
#828 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.