JSON_POST_ERROR, json_post.onerror.* INI, warning
[m6w6/ext-json_post] / tests / error001.phpt
index 1a43334304b264b607d029d18ae86528b5c828dc..ea4d193f870910c9c54b1ace9215dbf5c92c5fee 100644 (file)
@@ -1,28 +1,13 @@
 --TEST--
 --TEST--
-json_post with malformed JSON (https://github.com/m6w6/ext-json_post/issues/3)
---SKIPIF--
-<?php
-extension_loaded("json_post") or die("skip need json_post support\n");
-?>
---INI--
-json_post.error_response = 400
+json_post with malformed JSON [default] (https://github.com/m6w6/ext-json_post/issues/3)
+--EXTENSIONS--
+json_post
 --POST_RAW--
 Content-Type: application/json
 
 --POST_RAW--
 Content-Type: application/json
 
-{
-       "greeting": "Hello World
-}
---FILE--
-<?php
-var_dump($_POST);
-var_dump(json_last_error());
-?>
-Done
+{"a
+--FILE_EXTERNAL--
+error.inc
 --EXPECTHEADERS--
 --EXPECTHEADERS--
-Status: 400 Bad Request
-X-JSON-Error-Code: 3
---EXPECTF--
-array(0) {
-}
-int(0)
-Done
+--EXPECT--
+DONE