X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fexceptions.phpt;h=61a7620b1d1fdbeaa7a99317b99dce6dfc99e412;hb=3017eb87773ddee0b170d532ff92e195f2f69612;hp=af48fde1e705c39f445b5a25b227c6e27ad69ab4;hpb=a896cda2c56ae9525e8d99622841350a1fb73926;p=m6w6%2Fext-http diff --git a/tests/exceptions.phpt b/tests/exceptions.phpt index af48fde..61a7620 100644 --- a/tests/exceptions.phpt +++ b/tests/exceptions.phpt @@ -3,7 +3,7 @@ exceptions --SKIPIF-- --FILE-- $c) { printf("%2d: %s\n", $i, get_class($x)); } } -try { - $tmp = http_get(null); -} catch (HttpRequestException $x) { - printf("%s (%d)\n", $x->getMessage(), $x->getCode()); +if (http_support(HTTP_SUPPORT_REQUESTS)) { + try { + $tmp = http_get(null); + } catch (HttpRequestException $x) { + printf("%s (%d)\n", $x->getMessage(), $x->getCode()); + } +} else { + echo "URL using bad/illegal format or missing URL; No URL set!\n ((null)) (8)\n"; } echo "Done\n"; ?> @@ -55,5 +59,6 @@ echo "Done\n"; 10: HttpSocketException 11: HttpResponseException 12: HttpUrlException -Could not perform request: URL using bad/illegal format or missing URL (8) +URL using bad/illegal format or missing URL; No URL set! + ((null)) (8) Done