X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-json_post;a=blobdiff_plain;f=tests%2Ferror005.phpt;h=97c4988d0601a280dc808b9a4511f769f7a39bce;hp=aeea867dea0cce62de19717ddeb90871ad7a644f;hb=129e8b459061f9f4c76e3ee8a6baaef68c0bba41;hpb=ec734303777fdc01e36eff4fa7bac48edbc83cd3 diff --git a/tests/error005.phpt b/tests/error005.phpt index aeea867..97c4988 100644 --- a/tests/error005.phpt +++ b/tests/error005.phpt @@ -1,31 +1,24 @@ --TEST-- -json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) ---SKIPIF-- - +json_post with malformed JSON [response override] (https://github.com/m6w6/ext-json_post/issues/3) +--EXTENSIONS-- +json_post --INI-- -json_post.error_response = 444 -json_post.flags = 1 +json_post.onerror.response = 444 --POST_RAW-- Content-Type: application/json -{ - "greeting": "Hello World -} +{"a --FILE-- -Done --EXPECTHEADERS-- Status: 400 Bad Request -X-JSON-Error-Code: 3 ---EXPECTF-- -array(0) { +--EXPECT-- +array(1) { + ["http_response_code"]=> + int(400) } -int(400) -Done +DONE