97c4988d0601a280dc808b9a4511f769f7a39bce
[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 --EXTENSIONS--
4 json_post
5 --INI--
6 json_post.onerror.response = 444
7 --POST_RAW--
8 Content-Type: application/json
9
10 {"a
11 --FILE--
12 <?php
13 if (JSON_POST_ERROR)
14 http_response_code(400);
15 include "./error.inc";
16 ?>
17 --EXPECTHEADERS--
18 Status: 400 Bad Request
19 --EXPECT--
20 array(1) {
21 ["http_response_code"]=>
22 int(400)
23 }
24 DONE