- made the silently failing message parser raise some errors
[m6w6/ext-http] / tests / exceptions.phpt
index af48fde1e705c39f445b5a25b227c6e27ad69ab4..8e9ea5d1cd458c03002778bfbaeb050663563008 100644 (file)
@@ -3,7 +3,7 @@ exceptions
 --SKIPIF--
 <?php
 include 'skip.inc';
-checkver(5);
+checkmin(5);
 ?>
 --FILE--
 <?php
@@ -34,10 +34,14 @@ foreach ($e as $i => $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 ((null)) (8)\n";
 }
 echo "Done\n";
 ?>
@@ -55,5 +59,5 @@ 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 ((null)) (8)
 Done