X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-raphf;a=blobdiff_plain;f=tests%2Fhttp001.phpt;h=8c578aefedf25111abaea585a3389cd137aa0cec;hp=a28d8e1f3ed2f0a0c8a46558b842353715ff0784;hb=4043e684623034ddebe9673d4f44b3fd3afabb89;hpb=f6f642fe8923885b0ad25ca97be20a72fc9a539c diff --git a/tests/http001.phpt b/tests/http001.phpt index a28d8e1..8c578ae 100644 --- a/tests/http001.phpt +++ b/tests/http001.phpt @@ -13,24 +13,27 @@ if (!class_exists("http\\Client", false)) { enqueue(new http\Client\Request("GET", "http://php.net")); } while (count($c) < 3); -var_dump(raphf\stat_persistent_handles()); +$h = (array) raphf\stat_persistent_handles(); +var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h))))); unset($c); -var_dump(raphf\stat_persistent_handles()); +$h = (array) raphf\stat_persistent_handles(); +var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h))))); ?> Done --EXPECTF-- Test -object(stdClass)#%d (2) { +array(2) { ["http\Client\Curl"]=> array(0) { } @@ -38,10 +41,10 @@ object(stdClass)#%d (2) { array(0) { } } -object(stdClass)#%d (2) { +array(2) { ["http\Client\Curl"]=> array(1) { - ["php.net:80"]=> + ["PHP"]=> array(2) { ["used"]=> int(1) @@ -51,7 +54,7 @@ object(stdClass)#%d (2) { } ["http\Client\Curl\Request"]=> array(1) { - ["php.net:80"]=> + ["PHP:php.net:80"]=> array(2) { ["used"]=> int(3) @@ -60,10 +63,10 @@ object(stdClass)#%d (2) { } } } -object(stdClass)#%d (2) { +array(2) { ["http\Client\Curl"]=> array(1) { - ["php.net:80"]=> + ["PHP"]=> array(2) { ["used"]=> int(0) @@ -73,7 +76,7 @@ object(stdClass)#%d (2) { } ["http\Client\Curl\Request"]=> array(1) { - ["php.net:80"]=> + ["PHP:php.net:80"]=> array(2) { ["used"]=> int(0)