Manually set a response for the request.
This method is useful for specifying a mock response for the request or setting the response using a cache. Manually setting a response will bypass the actual sending of a request.
Response $response Response object to set:
bool $queued Set to TRUE to keep the request in a state of not having been sent, but queue the: response for send()
RequestInterface Returns a reference to the object.
public function setResponse(Response $response, $queued = false);