fixed pointless initialization of persistent handles lists on cleanup
[m6w6/ext-raphf] / tests / http002.phpt
index 505adc575e54b1283db610179f85d07b734fe89e..e9a59667f1385a3038db1af71395e29264b79643 100644 (file)
@@ -13,7 +13,7 @@ if (!class_exists("http\\Client", false)) {
 <?php
 echo "Test\n";
 
-$c = new http\Client("curl", "php.net:80");
+$c = new http\Client("curl", "PHP");
 do {
        $c->enqueue(new http\Client\Request("GET", "http://php.net"));
 } while (count($c) < 3);
@@ -25,7 +25,7 @@ var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h))
 
 
 raphf\clean_persistent_handles("http\\Client\\Curl");
-raphf\clean_persistent_handles("http\\Client\\Curl\\Request", "php.net:80");
+raphf\clean_persistent_handles("http\\Client\\Curl\\Request", "PHP:php.net:80");
 
 $h = (array) raphf\stat_persistent_handles();
 var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
@@ -37,7 +37,7 @@ Test
 array(2) {
   ["http\Client\Curl"]=>
   array(1) {
-    ["php.net:80"]=>
+    ["PHP"]=>
     array(2) {
       ["used"]=>
       int(0)
@@ -47,7 +47,7 @@ array(2) {
   }
   ["http\Client\Curl\Request"]=>
   array(1) {
-    ["php.net:80"]=>
+    ["PHP:php.net:80"]=>
     array(2) {
       ["used"]=>
       int(0)
@@ -62,7 +62,7 @@ array(2) {
   }
   ["http\Client\Curl\Request"]=>
   array(1) {
-    ["php.net:80"]=>
+    ["PHP:php.net:80"]=>
     array(2) {
       ["used"]=>
       int(0)