X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ferror001.phpt;fp=tests%2Ferror001.phpt;h=1a43334304b264b607d029d18ae86528b5c828dc;hb=98b35c8f1a7c1c1bc818ee163048a76c81dd7141;hp=0000000000000000000000000000000000000000;hpb=8d2e34341cc92db8b41a3e6bcc81514673a756a8;p=m6w6%2Fext-json_post diff --git a/tests/error001.phpt b/tests/error001.phpt new file mode 100644 index 0000000..1a43334 --- /dev/null +++ b/tests/error001.phpt @@ -0,0 +1,28 @@ +--TEST-- +json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) +--SKIPIF-- + +--INI-- +json_post.error_response = 400 +--POST_RAW-- +Content-Type: application/json + +{ + "greeting": "Hello World +} +--FILE-- + +Done +--EXPECTHEADERS-- +Status: 400 Bad Request +X-JSON-Error-Code: 3 +--EXPECTF-- +array(0) { +} +int(0) +Done