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,
19 lines
466 B
JSON
19 lines
466 B
JSON
{
|
|
"success": true,
|
|
"errors": [
|
|
{}
|
|
],
|
|
"messages": [
|
|
{}
|
|
],
|
|
"result": {
|
|
"id": "372e67954025e0ba6aaa6d586b9e0b59",
|
|
"description": "Prevent access from abusive clients identified by this UserAgent to mitigate DDoS attack",
|
|
"mode": "js_challenge",
|
|
"configuration": {
|
|
"target": "ua",
|
|
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4"
|
|
}
|
|
}
|
|
}
|