X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Furlparser002.phpt;fp=tests%2Furlparser002.phpt;h=be1cd66f5b93941670f379cc5f687f9f6f0fdea6;hp=0000000000000000000000000000000000000000;hb=c5a2e0f00072f02c1aac569487ccf4f803b89f64;hpb=39456918dd8c443592a2e3fe39f4b1525dc09948 diff --git a/tests/urlparser002.phpt b/tests/urlparser002.phpt new file mode 100644 index 0000000..be1cd66 --- /dev/null +++ b/tests/urlparser002.phpt @@ -0,0 +1,211 @@ +--TEST-- +url parser with paths +--SKIPIF-- + +--FILE-- + +DONE +--EXPECTF-- +Test + +s:a/ +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(2) "a/" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +ss:aa/ +object(http\Url)#%d (8) { + ["scheme"]=> + string(2) "ss" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(3) "aa/" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +s:/a/ +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(3) "/a/" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +ss:/aa/ +object(http\Url)#%d (8) { + ["scheme"]=> + string(2) "ss" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(4) "/aa/" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +s://a/ +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + string(1) "a" + ["port"]=> + NULL + ["path"]=> + string(1) "/" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +s://h/a +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + string(1) "h" + ["port"]=> + NULL + ["path"]=> + string(2) "/a" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +ss://hh/aa +object(http\Url)#%d (8) { + ["scheme"]=> + string(2) "ss" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + string(2) "hh" + ["port"]=> + NULL + ["path"]=> + string(3) "/aa" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +s:///a/b +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(4) "/a/b" + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +ss:///aa/bb +object(http\Url)#%d (8) { + ["scheme"]=> + string(2) "ss" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + NULL + ["port"]=> + NULL + ["path"]=> + string(6) "/aa/bb" + ["query"]=> + NULL + ["fragment"]=> + NULL +} +DONE