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
update travis
[m6w6/ext-json_post]
/
tests
/
001.phpt
diff --git
a/tests/001.phpt
b/tests/001.phpt
index b3e5775c1a5329a3eeed4db7914a5be16c51c680..d4ee29f2472c401c68c3be9be226fb9c9d1713ff 100644
(file)
--- a/
tests/001.phpt
+++ b/
tests/001.phpt
@@
-1,8
+1,8
@@
--TEST--
--TEST--
-json_post
+json_post
with most common types, as array
--SKIPIF--
<?php
--SKIPIF--
<?php
-extension_loaded("json_post")
)
or die("skip need json_post support\n");
+extension_loaded("json_post") or die("skip need json_post support\n");
?>
--POST_RAW--
Content-type: text/json
?>
--POST_RAW--
Content-type: text/json
@@
-11,7
+11,6
@@
Content-type: text/json
"null": null,
"bool": true,
"int": 123,
"null": null,
"bool": true,
"int": 123,
- "bigint": 36893488147419103232,
"float": 123.123,
"string": "Hello World",
"array": [1,2,3],
"float": 123.123,
"string": "Hello World",
"array": [1,2,3],
@@
-22,18
+21,17
@@
Content-type: text/json
}
--FILE--
<?php
}
--FILE--
<?php
-var_dump($_POST, json_last_error
_msg
());
+var_dump($_POST, json_last_error());
?>
?>
+Done
--EXPECTF--
--EXPECTF--
-array(
8
) {
+array(
7
) {
["null"]=>
NULL
["bool"]=>
bool(true)
["int"]=>
int(123)
["null"]=>
NULL
["bool"]=>
bool(true)
["int"]=>
int(123)
- ["bigint"]=>
- float(3.689%dE+19)
["float"]=>
float(123.123)
["string"]=>
["float"]=>
float(123.123)
["string"]=>
@@
-62,4
+60,5
@@
array(8) {
string(11) "Österreich"
}
}
string(11) "Österreich"
}
}
-string(8) "No error"
\ No newline at end of file
+int(0)
+Done
\ No newline at end of file