add test
[m6w6/ext-json_post] / tests / 005.phpt
diff --git a/tests/005.phpt b/tests/005.phpt
new file mode 100644 (file)
index 0000000..4fc5664
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+json_post with empty object
+--SKIPIF--
+<?php
+extension_loaded("json_post") or die("skip need json_post support\n");
+?>
+--POST_RAW--
+Content-type: text/json
+
+{
+}
+--FILE--
+<?php
+var_dump($_POST, json_last_error());
+?>
+Done
+--EXPECTF--
+array(0) {
+}
+int(0)
+Done