From e40f9d862d7c815ad6f823ab385ffede1bb740bc Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 16 Sep 2021 13:52:33 +0200 Subject: [PATCH] add another test --- tests/error005.phpt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/error005.phpt diff --git a/tests/error005.phpt b/tests/error005.phpt new file mode 100644 index 0000000..748374a --- /dev/null +++ b/tests/error005.phpt @@ -0,0 +1,31 @@ +--TEST-- +json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3) +--SKIPIF-- + +--INI-- +json_post.error_response = 444 +json_post.flags = 1 +--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 -- 2.30.2