X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2F001.phpt;fp=tests%2F001.phpt;h=b3e5775c1a5329a3eeed4db7914a5be16c51c680;hb=3964b8f0cd83ef3ba5de9d0b2e5e395f95404a8c;hp=0000000000000000000000000000000000000000;hpb=5c72938056611ccba2a36bc2332e21c69855ae96;p=m6w6%2Fext-json_post diff --git a/tests/001.phpt b/tests/001.phpt new file mode 100644 index 0000000..b3e5775 --- /dev/null +++ b/tests/001.phpt @@ -0,0 +1,65 @@ +--TEST-- +json_post +--SKIPIF-- + +--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-- +array(8) { + ["null"]=> + NULL + ["bool"]=> + bool(true) + ["int"]=> + int(123) + ["bigint"]=> + float(3.689%dE+19) + ["float"]=> + float(123.123) + ["string"]=> + string(11) "Hello World" + ["array"]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } + ["object"]=> + array(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