X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fhttp001.phpt;fp=tests%2Fhttp001.phpt;h=a28d8e1f3ed2f0a0c8a46558b842353715ff0784;hb=f6f642fe8923885b0ad25ca97be20a72fc9a539c;hp=0000000000000000000000000000000000000000;hpb=02b71ab2353c851f1cf7212523db2f1a325bd0f4;p=m6w6%2Fext-raphf diff --git a/tests/http001.phpt b/tests/http001.phpt new file mode 100644 index 0000000..a28d8e1 --- /dev/null +++ b/tests/http001.phpt @@ -0,0 +1,85 @@ +--TEST-- +pecl/http-v2 - general and stat +--SKIPIF-- + +--FILE-- +enqueue(new http\Client\Request("GET", "http://php.net")); +} while (count($c) < 3); + +var_dump(raphf\stat_persistent_handles()); + +unset($c); + +var_dump(raphf\stat_persistent_handles()); + +?> +Done +--EXPECTF-- +Test +object(stdClass)#%d (2) { + ["http\Client\Curl"]=> + array(0) { + } + ["http\Client\Curl\Request"]=> + array(0) { + } +} +object(stdClass)#%d (2) { + ["http\Client\Curl"]=> + array(1) { + ["php.net:80"]=> + array(2) { + ["used"]=> + int(1) + ["free"]=> + int(0) + } + } + ["http\Client\Curl\Request"]=> + array(1) { + ["php.net:80"]=> + array(2) { + ["used"]=> + int(3) + ["free"]=> + int(0) + } + } +} +object(stdClass)#%d (2) { + ["http\Client\Curl"]=> + array(1) { + ["php.net:80"]=> + array(2) { + ["used"]=> + int(0) + ["free"]=> + int(1) + } + } + ["http\Client\Curl\Request"]=> + array(1) { + ["php.net:80"]=> + array(2) { + ["used"]=> + int(0) + ["free"]=> + int(3) + } + } +} +Done