]> granicus.if.org Git - php/commitdiff
Fixed tests (skip when catch-all DNS such as openDNS is being used)
authorIlia Alshanetsky <iliaa@php.net>
Wed, 7 Sep 2011 15:31:48 +0000 (15:31 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 7 Sep 2011 15:31:48 +0000 (15:31 +0000)
ext/curl/tests/curl_basic_008.phpt
ext/curl/tests/curl_basic_010.phpt

index 32de4d0f5c9b205e23795905941bec0ec7f24bb3..29e3343707ebb05c1a4fa425ead0d5eb466a1675 100755 (executable)
@@ -3,7 +3,13 @@ Test curl_error() & curl_errno() function with problematic host
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
 --SKIPIF--
-<?php if (!extension_loaded("curl")) print "skip"; ?>
+<?php
+       if (!extension_loaded("curl")) print "skip"; 
+       $addr = "www.".uniqid().".".uniqid();
+       if (gethostbyname($addr) != $addr) {
+               print "skip catch all dns";
+       }
+?>
 --FILE--
 <?php
 
index 9a595b3c03c56ce1641088a2a40e4b0041e8a038..7da64d39b6a86ab03dd1df4c06c168dce5706b8a 100644 (file)
@@ -3,7 +3,13 @@ Test curl_error() & curl_errno() function with problematic proxy
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
 --SKIPIF--
-<?php if (!extension_loaded("curl")) print "skip"; ?>
+<?php
+       if (!extension_loaded("curl")) print "skip";
+       $addr = "www.".uniqid().".".uniqid();
+       if (gethostbyname($addr) != $addr) {
+               print "skip catch all dns";
+       }
+?>
 --FILE--
 <?php