Skip to content

Allow partial mocking #501

@epixian

Description

@epixian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions