saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Allow partial mocking

Open epixian opened this issue 6 months ago • 2 comments

When testing end to end I might be hitting my own API which in turn sends to another API via background job or something. I don't have access to the connector or request(s) in these instances, and sometimes I would like to be able to mock some requests but not others.

Would be nice to be able to fall back to sending an actual request if a mock response for a given endpoint isn't found. Since mock responses are injected via DetermineMockResponse (a RequestMiddleware), I think you could do this just by returning the $pendingRequest instead of throwing a NoMockResponseFoundException.

epixian avatar Jun 19 '25 20:06 epixian