X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-json_post;a=blobdiff_plain;f=tests%2Ferror003.phpt;fp=tests%2Ferror003.phpt;h=9147a12855e619399ef56e05ac6f61c31a8e7a80;hp=0000000000000000000000000000000000000000;hb=98b35c8f1a7c1c1bc818ee163048a76c81dd7141;hpb=8d2e34341cc92db8b41a3e6bcc81514673a756a8 diff --git a/tests/error003.phpt b/tests/error003.phpt new file mode 100644 index 0000000..9147a12 --- /dev/null +++ b/tests/error003.phpt @@ -0,0 +1,25 @@ +--TEST-- +json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) +--SKIPIF-- + +--INI-- +json_post.error_response = 444 +json_post.error_exit = true +--POST_RAW-- +Content-Type: application/json + +{ + "greeting": "Hello World +} +--FILE-- + +Done +--EXPECTHEADERS-- +Status: 444 +X-JSON-Error-Code: 3 +--EXPECT--