X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fparse_message_004.phpt;fp=tests%2Fparse_message_004.phpt;h=a684e84c82b2a8902de7d2ad6263219d4823924f;hb=91c98198094e89bd2a0d0648b60dd2c361d3054b;hp=0000000000000000000000000000000000000000;hpb=c9a41488faf406e62675ebc75c3abf1c50725852;p=m6w6%2Fext-http diff --git a/tests/parse_message_004.phpt b/tests/parse_message_004.phpt new file mode 100644 index 0000000..a684e84 --- /dev/null +++ b/tests/parse_message_004.phpt @@ -0,0 +1,115 @@ +--TEST-- +http_parse_message() recursive +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +%sTEST +object(stdClass)#1 (7) { + ["type"]=> + int(2) + ["httpVersion"]=> + float(1.1) + ["responseCode"]=> + int(200) + ["responseStatus"]=> + string(2) "Ok" + ["headers"]=> + array(2) { + ["Server"]=> + string(9) "Funky/1.0" + ["Content-Length"]=> + string(2) "10" + } + ["body"]=> + string(10) "1234567890" + ["parentMessage"]=> + object(stdClass)#2 (7) { + ["type"]=> + int(1) + ["httpVersion"]=> + float(1.1) + ["requestMethod"]=> + string(3) "GET" + ["requestUri"]=> + string(1) "/" + ["headers"]=> + array(2) { + ["Host"]=> + string(15) "www.example.com" + ["Accept"]=> + string(3) "*/*" + } + ["body"]=> + string(0) "" + ["parentMessage"]=> + object(stdClass)#3 (7) { + ["type"]=> + int(2) + ["httpVersion"]=> + float(1.1) + ["responseCode"]=> + int(200) + ["responseStatus"]=> + string(2) "Ok" + ["headers"]=> + array(2) { + ["Server"]=> + string(9) "Funky/1.0" + ["Content-Length"]=> + string(2) "10" + } + ["body"]=> + string(0) "" + ["parentMessage"]=> + object(stdClass)#4 (7) { + ["type"]=> + int(1) + ["httpVersion"]=> + float(1.1) + ["requestMethod"]=> + string(4) "HEAD" + ["requestUri"]=> + string(1) "/" + ["headers"]=> + array(2) { + ["Host"]=> + string(15) "www.example.com" + ["Accept"]=> + string(3) "*/*" + } + ["body"]=> + string(0) "" + ["parentMessage"]=> + NULL + } + } + } +} +Done