fix tests
authorMichael Wallner <mike@php.net>
Fri, 1 Aug 2014 11:40:47 +0000 (13:40 +0200)
committerMichael Wallner <mike@php.net>
Fri, 1 Aug 2014 11:40:47 +0000 (13:40 +0200)
tests/001.phpt
tests/002.phpt
tests/003.phpt

index 9036fda2864659f19f1cbf49cf4f3bf18c92071b..cbaaf03ea42a428878e38b84954dd0cd8df94560 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 ares
 --SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
 --FILE--
 <?php 
 echo "-TEST\n";
@@ -14,9 +14,9 @@ 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", "a.resolvers.Level3.net");
+ares_gethostbyaddr($a, "cb", "4.2.2.2");
+ares_getnameinfo($a, "cb", ARES_NI_TCP, "4.2.2.3");
 
 ares_process_all($a);
 ares_destroy($a);
@@ -31,7 +31,7 @@ Array
     [1] => 0
     [2] => stdClass Object
         (
-            [name] => php.net
+            [name] => a.resolvers.Level3.net
             [aliases] => Array
                 (
                 )
@@ -39,7 +39,7 @@ Array
             [addrtype] => 2
             [addrlist] => Array
                 (
-                    [0] => 66.163.161.117
+                    [0] => 4.2.2.1
                 )
 
         )
@@ -51,15 +51,16 @@ Array
     [1] => 0
     [2] => stdClass Object
         (
-            [name] => y2.php.net
+            [name] => b.resolvers.Level3.net
             [aliases] => Array
                 (
+                    [0] => b.resolvers.Level3.net
                 )
 
             [addrtype] => 2
             [addrlist] => Array
                 (
-                    [0] => 66.163.161.117
+                    [0] => 4.2.2.2
                 )
 
         )
@@ -69,7 +70,7 @@ Array
 (
     [0] => Resource id #%d
     [1] => 0
-    [2] => y2.php.net
+    [2] => c.resolvers.level3.net
     [3] => 
 )
 Done
index baf8aed4c0d3c43b9bed3a71f3a274cc8a170da7..766d84a36693902968107e41351fafa8b425fd4a 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 ares
 --SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
 --FILE--
 <?php
 echo "-TEST\n";
@@ -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") as $tld) {
        $q[] = ares_gethostbyname($a, null, "$tld.php.net");
 }
 
@@ -29,75 +29,43 @@ echo "Done\n";
 %sTEST
 stdClass Object
 (
-    [name] => gd.tuwien.ac.at
+    [name] => %s
     [aliases] => Array
         (
-            [0] => at.php.net
         )
 
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 192.35.244.50
+            %a
         )
 
 )
 stdClass Object
 (
-    [name] => php3.globe.de
+    [name] => %s
     [aliases] => Array
         (
-            [0] => de.php.net
         )
 
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 212.124.37.9
+            %a
         )
 
 )
 stdClass Object
 (
-    [name] => php.networkedsystems.co.uk
+    [name] => %s
     [aliases] => Array
         (
-            [0] => uk.php.net
         )
 
     [addrtype] => 2
     [addrlist] => Array
         (
-            [0] => 85.116.4.7
-        )
-
-)
-stdClass Object
-(
-    [name] => ch.php.net
-    [aliases] => Array
-        (
-        )
-
-    [addrtype] => 2
-    [addrlist] => Array
-        (
-            [0] => 128.178.77.24
-        )
-
-)
-stdClass Object
-(
-    [name] => php.directnet.ru
-    [aliases] => Array
-        (
-            [0] => ru.php.net
-        )
-
-    [addrtype] => 2
-    [addrlist] => Array
-        (
-            [0] => 195.222.164.18
+            %a
         )
 
 )
index f079842c9f981c677d66fd6385915b6446321e61..92a904643796e49908d6e8c836131dc8559a565e 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 ares
 --SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
 --FILE--
 <?php
 echo "-TEST\n";
@@ -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");
 }
 
@@ -102,19 +102,4 @@ stdClass Object
     [gethostbyaddr] => 
     [getnameinfo] => 
 )
-stdClass Object
-(
-    [type] => 3
-    [search] => 
-    [query] => 
-    [send] => 
-    [gethostbyname] => stdClass Object
-        (
-            [name] => ru.php.net
-            [family] => 2
-        )
-
-    [gethostbyaddr] => 
-    [getnameinfo] => 
-)
 Done