Internally, this calls StubbedRequest which handles the logic
See stub_registry()
for listing stubs, stub_registry_clear()
for removing all stubs and remove_request_stub()
for removing specific
stubs
If multiple stubs match the same request, we use the first stub. So if you
want to use a stub that was created after an earlier one that matches,
remove the earlier one(s).
Note on wi_th()
: If you pass query
, values are coerced to character
class in the recorded stub. You can pass numeric, integer, etc., but
all will be coerced to character.
See wi_th()
for details on request body/query/headers and
to_return()
for details on how response status/body/headers
are handled