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,
32 lines
548 B
JSON
32 lines
548 B
JSON
{
|
|
"success": true,
|
|
"errors": [
|
|
{}
|
|
],
|
|
"messages": [
|
|
{}
|
|
],
|
|
"result": {
|
|
"id": "9a7806061c88ada191ed06f989cc3dac",
|
|
"targets": [
|
|
{
|
|
"target": "url",
|
|
"constraint": {
|
|
"operator": "matches",
|
|
"value": "*example.com/images/*"
|
|
}
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"id": "always_online",
|
|
"value": "on"
|
|
}
|
|
],
|
|
"priority": 1,
|
|
"status": "active",
|
|
"modified_on": "2014-01-01T05:20:00.12345Z",
|
|
"created_on": "2014-01-01T05:20:00.12345Z"
|
|
}
|
|
}
|