X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Furlparser008.phpt;fp=tests%2Furlparser008.phpt;h=98382f43c4cb97823923e0555bd2ccb7d3ab7750;hb=a760e170d36cc40ce992ebcdb13f0877ddfa3d73;hp=0000000000000000000000000000000000000000;hpb=62e9d3e1f5ec8896131313c70574ce7f7cbcfc99;p=m6w6%2Fext-http diff --git a/tests/urlparser008.phpt b/tests/urlparser008.phpt new file mode 100644 index 0000000..98382f4 --- /dev/null +++ b/tests/urlparser008.phpt @@ -0,0 +1,76 @@ +--TEST-- +url parser ipv6 +--SKIPIF-- + +--FILE-- +getMessage(),"\n"; + } +} +?> +DONE +--EXPECTF-- +Test + +s://[a:80 +http\Url::parse(): Failed to parse hostinfo; expected ']' + +s://[0] +http\Url::parse(): Failed to parse hostinfo; unexpected '[' + +s://[::1]:80 +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + NULL + ["pass"]=> + NULL + ["host"]=> + string(5) "[::1]" + ["port"]=> + int(80) + ["path"]=> + NULL + ["query"]=> + NULL + ["fragment"]=> + NULL +} + +s://mike@[0:0:0:0:0:FFFF:204.152.189.116]/foo +object(http\Url)#%d (8) { + ["scheme"]=> + string(1) "s" + ["user"]=> + string(4) "mike" + ["pass"]=> + NULL + ["host"]=> + string(24) "[::ffff:204.152.189.116]" + ["port"]=> + NULL + ["path"]=> + string(4) "/foo" + ["query"]=> + NULL + ["fragment"]=> + NULL +} +DONE