RecordedResponse
class RecordedResponse implements JsonSerializable
Methods
__construct(int $statusCode, array $headers = [], array|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 21
__construct(int $statusCode, array $headers = [], array|string $data = '', array $context = [])
Create a recorded response.
at line 32
static RecordedResponse
fromFile(string $contents)
Create a recorded response from fixture contents.
at line 59
static RecordedResponse
fromResponse(Response $response)
Create a recorded response from a Saloon response.
at line 71
string
toFile()
Encode the response for fixture storage.
at line 79
MockResponse
toMockResponse()
Create a mock response from the recorded value.
at line 89
array
jsonSerialize()
Convert the recorded response to its fixture representation.