projects
/
m6w6
/
ext-json_post
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
better way to access json globals on PHP 5
[m6w6/ext-json_post]
/
tests
/
error002.phpt
diff --git
a/tests/error002.phpt
b/tests/error002.phpt
index 8ebb2c00aa7ee3567f26e5f32e940728879ec4c8..076d2a71edefcf435eb1f520323981e8f3f9b274 100644
(file)
--- a/
tests/error002.phpt
+++ b/
tests/error002.phpt
@@
-1,30
+1,14
@@
--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");
-if (PHP_VERSION_ID < 70000) die("skip need PHP-7.0+\n");
-?>
+json_post with malformed JSON [response] (https://github.com/m6w6/ext-json_post/issues/3)
--INI--
--INI--
-json_post.error_response = 400
-json_post.flags = 4194305
+json_post.onerror.response = 400
--POST_RAW--
Content-Type: application/json
--POST_RAW--
Content-Type: application/json
-{
- "greeting": "Hello World
-}
---FILE--
-<?php
-var_dump($_POST);
-var_dump(http_response_code());
-?>
-Done
+{"a
+--FILE_EXTERNAL--
+error.inc
--EXPECTHEADERS--
Status: 400 Bad Request
--EXPECTHEADERS--
Status: 400 Bad Request
-X-JSON-Error-Code: 3
---EXPECTF--
-array(0) {
-}
-int(400)
-Done
+--EXPECT--
+DONE