This PR moves the JSON API responses used in the tests to fixture files within the tests folder. This allows reuse and the ability to lint/validate these fixtures if required - although not covered in this PR. I've added TestCase::getPsr7StreamForFixture and TestCase::getPsr7JsonResponseForFixture to reduce code duplication and enable some assertions around the expected fixures/responses. Thanks,
63 lines
1.5 KiB
JSON
63 lines
1.5 KiB
JSON
{
|
|
"success": true,
|
|
"errors": [],
|
|
"messages": [],
|
|
"result": [
|
|
{
|
|
"id": "023e105f4ecef8ad9ca31a8372d0c353",
|
|
"name": "example.com",
|
|
"development_mode": 7200,
|
|
"original_name_servers": [
|
|
"ns1.originaldnshost.com",
|
|
"ns2.originaldnshost.com"
|
|
],
|
|
"original_registrar": "GoDaddy",
|
|
"original_dnshost": "NameCheap",
|
|
"created_on": "2014-01-01T05:20:00.12345Z",
|
|
"modified_on": "2014-01-01T05:20:00.12345Z",
|
|
"name_servers": [
|
|
"tony.ns.cloudflare.com",
|
|
"woz.ns.cloudflare.com"
|
|
],
|
|
"owner": {
|
|
"id": "7c5dae5552338874e5053f2534d2767a",
|
|
"email": "user@example.com",
|
|
"owner_type": "user"
|
|
},
|
|
"permissions": [
|
|
"#zone:read",
|
|
"#zone:edit"
|
|
],
|
|
"plan": {
|
|
"id": "e592fd9519420ba7405e1307bff33214",
|
|
"name": "Pro Plan",
|
|
"price": 20,
|
|
"currency": "USD",
|
|
"frequency": "monthly",
|
|
"legacy_id": "pro",
|
|
"is_subscribed": true,
|
|
"can_subscribe": true
|
|
},
|
|
"plan_pending": {
|
|
"id": "e592fd9519420ba7405e1307bff33214",
|
|
"name": "Pro Plan",
|
|
"price": 20,
|
|
"currency": "USD",
|
|
"frequency": "monthly",
|
|
"legacy_id": "pro",
|
|
"is_subscribed": true,
|
|
"can_subscribe": true
|
|
},
|
|
"status": "active",
|
|
"paused": false,
|
|
"type": "full"
|
|
}
|
|
],
|
|
"result_info": {
|
|
"page": 1,
|
|
"per_page": 20,
|
|
"count": 1,
|
|
"total_count": 2000
|
|
}
|
|
}
|