X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpersistenthandles001.phpt;h=01f5069bea86b75e511a9aaa3f09d3e7838b89f5;hb=64722314d70dc547e477d87927c22b598aa463d0;hp=dd7b8c7047c56fe5974c204f5436ca4521aaa871;hpb=a84a30daa74ea8ff52a671769528ccf06580be4e;p=m6w6%2Fext-http diff --git a/tests/persistenthandles001.phpt b/tests/persistenthandles001.phpt index dd7b8c7..01f5069 100644 --- a/tests/persistenthandles001.phpt +++ b/tests/persistenthandles001.phpt @@ -4,32 +4,26 @@ persistent handles --FILE-- "foo"))) - ->createRequest("http://dev.iworks.at") +(new http\Client\Factory(array("persistentHandleId" => "foo"))) + ->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at")) ->setOptions(array("connecttimeout"=> 90, "timeout" =>300)) - ->send(); -$r = (new http\Request\Factory(array("persistentHandleId" => "bar"))) - ->createRequest("http://dev.iworks.at") + ->send(null); +$r = (new http\Client\Factory(array("persistentHandleId" => "bar"))) + ->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at")) ->setOptions(array("connecttimeout"=> 90, "timeout" =>300)); var_dump(http\Env::statPersistentHandles()); http\Env::cleanPersistentHandles(); var_dump(http\Env::statPersistentHandles()); -$r->send(); +$r->send(null); var_dump(http\Env::statPersistentHandles()); ?> DONE --EXPECTF-- object(stdClass)#%d (3) { - ["http_request_datashare.curl"]=> - array(0) { - } - ["http_request_pool.curl"]=> - array(0) { - } - ["http_request.curl"]=> + ["http_client.curl"]=> array(2) { ["foo"]=> array(2) { @@ -46,15 +40,15 @@ object(stdClass)#%d (3) { int(0) } } -} -object(stdClass)#%d (3) { - ["http_request_datashare.curl"]=> + ["http_client_pool.curl"]=> array(0) { } - ["http_request_pool.curl"]=> + ["http_client_datashare.curl"]=> array(0) { } - ["http_request.curl"]=> +} +object(stdClass)#%d (3) { + ["http_client.curl"]=> array(1) { ["bar"]=> array(2) { @@ -64,15 +58,15 @@ object(stdClass)#%d (3) { int(0) } } -} -object(stdClass)#%d (3) { - ["http_request_datashare.curl"]=> + ["http_client_pool.curl"]=> array(0) { } - ["http_request_pool.curl"]=> + ["http_client_datashare.curl"]=> array(0) { } - ["http_request.curl"]=> +} +object(stdClass)#%d (3) { + ["http_client.curl"]=> array(1) { ["bar"]=> array(2) { @@ -82,5 +76,11 @@ object(stdClass)#%d (3) { int(0) } } + ["http_client_pool.curl"]=> + array(0) { + } + ["http_client_datashare.curl"]=> + array(0) { + } } DONE