let DEV_2 be trunk
[m6w6/ext-http] / tests / envrequestjson001.phpt
diff --git a/tests/envrequestjson001.phpt b/tests/envrequestjson001.phpt
new file mode 100644 (file)
index 0000000..3dfd9a8
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+env request json
+--SKIPIF--
+<?php
+include "skipif.inc";
+_ext("json");
+?>
+--POST_RAW--
+Content-Type: application/json
+
+{"foo": "bar", "a": [1,2,3]}
+--FILE--
+<?php
+echo "Test\n";
+print_r($_POST);
+?>
+Done
+--EXPECT--
+Test
+Array
+(
+    [foo] => bar
+    [a] => Array
+        (
+            [0] => 1
+            [1] => 2
+            [2] => 3
+        )
+
+)
+Done
+