php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch pecl_ares_fix_testcase.patch for ares Bug #63114

Patch version 2012-09-18 16:58 UTC

Return to Bug #63114 | Download this patch
Patch Revisions:

Developer: chobieeee@php.net

diff --git a/tests/001.phpt b/tests/001.phpt
index 9036fda..2732af8 100644
--- a/tests/001.phpt
+++ b/tests/001.phpt
@@ -14,11 +14,13 @@ function cb()
 
 $a = ares_init();
 
-ares_gethostbyname($a, "cb", "php.net");
-ares_gethostbyaddr($a, "cb", "66.163.161.117");
-ares_getnameinfo($a, "cb", ARES_NI_TCP, "66.163.161.117");
-
+ares_gethostbyname($a, "cb", "www.php.net");
+ares_process_all($a);
+ares_gethostbyaddr($a, "cb", "69.147.83.197");
 ares_process_all($a);
+ares_getnameinfo($a, "cb", ARES_NI_TCP, "69.147.83.197");
+ares_process_all($a);
+
 ares_destroy($a);
 
 echo "Done\n";
@@ -31,7 +33,7 @@ Array
     [1] => 0
     [2] => stdClass Object
         (
-            [name] => php.net
+            [name] => www.php.net
             [aliases] => Array
                 (
                 )
@@ -39,7 +41,8 @@ Array
             [addrtype] => 2
             [addrlist] => Array
                 (
-                    [0] => 66.163.161.117
+                    [0] => 69.147.83.19%d
+                    [1] => 69.147.83.19%d
                 )
 
         )
@@ -51,15 +54,16 @@ Array
     [1] => 0
     [2] => stdClass Object
         (
-            [name] => y2.php.net
+            [name] => www.php.net
             [aliases] => Array
                 (
+                    [0] => www.php.net
                 )
 
             [addrtype] => 2
             [addrlist] => Array
                 (
-                    [0] => 66.163.161.117
+                    [0] => 69.147.83.197
                 )
 
         )
@@ -69,7 +73,7 @@ Array
 (
     [0] => Resource id #%d
     [1] => 0
-    [2] => y2.php.net
+    [2] => www.php.net
     [3] => 
 )
 Done
diff --git a/tests/002.phpt b/tests/002.phpt
index baf8aed..5e25f72 100644
--- a/tests/002.phpt
+++ b/tests/002.phpt
@@ -9,7 +9,7 @@ echo "-TEST\n";
 $a = ares_init();
 $q = array();
 
-foreach (array("at", "de", "uk", "us", "ch", "ru") as $tld) {
+foreach (array("at", "de", "uk", "us", "ch") as $tld) {
 	$q[] = ares_gethostbyname($a, null, "$tld.php.net");
 }
 
@@ -33,6 +33,7 @@ stdClass Object
     [aliases] => Array
         (
             [0] => at.php.net
+            [1] => php.gds.tuwien.ac.at
         )
 
     [addrtype] => 2
@@ -59,7 +60,7 @@ stdClass Object
 )
 stdClass Object
 (
-    [name] => php.networkedsystems.co.uk
+    [name] => php.mirror.camelnetwork.com
     [aliases] => Array
         (
             [0] => uk.php.net
@@ -68,37 +69,38 @@ stdClass Object
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 85.116.4.7
+            [0] => 94.76.225.145
         )
 
 )
 stdClass Object
 (
-    [name] => ch.php.net
+    [name] => php-mirror.nexcess.net
     [aliases] => Array
         (
+            [0] => us.php.net
         )
 
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 128.178.77.24
+            [0] => 208.69.120.58
         )
 
 )
 stdClass Object
 (
-    [name] => php.directnet.ru
+    [name] => mirror.nstotal.net
     [aliases] => Array
         (
-            [0] => ru.php.net
+            [0] => ch.php.net
         )
 
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 195.222.164.18
+            [0] => 62.2.182.223
         )
 
 )
-Done
\ No newline at end of file
+Done
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC