X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-json_post;a=blobdiff_plain;f=tests%2F002.phpt;fp=tests%2F002.phpt;h=643f56098491b11041169d4ad248cfba7007c54f;hp=0000000000000000000000000000000000000000;hb=3964b8f0cd83ef3ba5de9d0b2e5e395f95404a8c;hpb=5c72938056611ccba2a36bc2332e21c69855ae96 diff --git a/tests/002.phpt b/tests/002.phpt new file mode 100644 index 0000000..643f560 --- /dev/null +++ b/tests/002.phpt @@ -0,0 +1,67 @@ +--TEST-- +json_post +--SKIPIF-- + +--INI-- +json_post.flags=2;JSON_BIGINT_AS_STRING +--POST_RAW-- +Content-type: text/json + +{ + "null": null, + "bool": true, + "int": 123, + "bigint": 36893488147419103232, + "float": 123.123, + "string": "Hello World", + "array": [1,2,3], + "object": { + "array": [1,2,3], + "unicode": "\u00D6sterreich" + } +} +--FILE-- + +--EXPECTF-- +object(stdClass)#%d (8) { + ["null"]=> + NULL + ["bool"]=> + bool(true) + ["int"]=> + int(123) + ["bigint"]=> + string(20) "36893488147419103232" + ["float"]=> + float(123.123) + ["string"]=> + string(11) "Hello World" + ["array"]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } + ["object"]=> + object(stdClass)#%d (2) { + ["array"]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } + ["unicode"]=> + string(11) "Österreich" + } +} +string(8) "No error" \ No newline at end of file