PHP compat 5-8
[m6w6/ext-json_post] / tests / error005.phpt
1 --TEST--
2 json_post with malformed JSON [response override] (https://github.com/m6w6/ext-json_post/issues/3)
3 --INI--
4 json_post.onerror.response = 444
5 --POST_RAW--
6 Content-Type: application/json
7
8 {"a
9 --FILE--
10 <?php
11 if (JSON_POST_ERROR)
12 http_response_code(400);
13 include "./error.inc";
14 ?>
15 --EXPECTHEADERS--
16 Status: 400 Bad Request
17 --EXPECT--
18 array(1) {
19 ["http_response_code"]=>
20 int(400)
21 }
22 DONE