RecordedResponse
class RecordedResponse implements JsonSerializable
Methods
__construct(int $statusCode, array $headers = [], string $data = '', array $context = [])
Create a recorded response.
static RecordedResponse
fromFile(string $contents)
Create a recorded response from fixture contents.
static RecordedResponse
string
toFile()
Encode the response for fixture storage.
toMockResponse()
Create a mock response from the recorded value.
array
jsonSerialize()
Convert the recorded response to its fixture representation.
Details
at line 20
__construct(int $statusCode, array $headers = [], string $data = '', array $context = [])
Create a recorded response.
at line 31
static RecordedResponse
fromFile(string $contents)
Create a recorded response from fixture contents.
at line 58
static RecordedResponse
fromResponse(Response $response)
Create a recorded response from a Saloon response.
at line 70
string
toFile()
Encode the response for fixture storage.
at line 78
MockResponse
toMockResponse()
Create a mock response from the recorded value.
at line 88
array
jsonSerialize()
Convert the recorded response to its fixture representation.