X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-json_post;a=blobdiff_plain;f=tests%2Ferror002.phpt;fp=tests%2Ferror002.phpt;h=3903d23df5dcaee62e9977051eaa03e4edd66a8f;hp=0000000000000000000000000000000000000000;hb=98b35c8f1a7c1c1bc818ee163048a76c81dd7141;hpb=8d2e34341cc92db8b41a3e6bcc81514673a756a8 diff --git a/tests/error002.phpt b/tests/error002.phpt new file mode 100644 index 0000000..3903d23 --- /dev/null +++ b/tests/error002.phpt @@ -0,0 +1,30 @@ +--TEST-- +json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) +--SKIPIF-- + +--INI-- +json_post.error_response = 400 +json_post.flags = 4194305 +--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(400) +Done