X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ferror002.phpt;fp=tests%2Ferror002.phpt;h=c4d35110b32c7899d72e3f251dd849131ad37739;hb=129e8b459061f9f4c76e3ee8a6baaef68c0bba41;hp=8ebb2c00aa7ee3567f26e5f32e940728879ec4c8;hpb=ec734303777fdc01e36eff4fa7bac48edbc83cd3;p=m6w6%2Fext-json_post diff --git a/tests/error002.phpt b/tests/error002.phpt index 8ebb2c0..c4d3511 100644 --- a/tests/error002.phpt +++ b/tests/error002.phpt @@ -1,30 +1,16 @@ --TEST-- -json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) ---SKIPIF-- - +json_post with malformed JSON [response] (https://github.com/m6w6/ext-json_post/issues/3) +--EXTENSIONS-- +json_post --INI-- -json_post.error_response = 400 -json_post.flags = 4194305 +json_post.onerror.response = 400 --POST_RAW-- Content-Type: application/json -{ - "greeting": "Hello World -} ---FILE-- - -Done +{"a +--FILE_EXTERNAL-- +error.inc --EXPECTHEADERS-- Status: 400 Bad Request -X-JSON-Error-Code: 3 ---EXPECTF-- -array(0) { -} -int(400) -Done +--EXPECT-- +DONE