X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fclient009.phpt;fp=tests%2Fclient009.phpt;h=0eb08f73a96f0c2e779a677854da3c3788713522;hp=6aea2255cd35b2654550f248f446597ca7a3c87a;hb=b6eeba772d69a317ee541c95c43bd0459444fec8;hpb=ef9c474299e45b4d952b6a821b11f5121624a5fc diff --git a/tests/client009.phpt b/tests/client009.phpt index 6aea225..0eb08f7 100644 --- a/tests/client009.phpt +++ b/tests/client009.phpt @@ -19,24 +19,33 @@ function x($a) { } server("env.inc", function($port) { + $client = new http\Client; + $client->setCookies(array("test" => "bar")); + $client->addCookies(array("foo" => "test")); $request = new http\Client\Request("GET", "http://localhost:$port"); + $client->enqueue($request); + $client->send(); + echo $client->getResponse()->getBody()->toString(); - foreach (http\Client::getAvailableDrivers() as $driver) { - $client = new http\Client($driver); - $client->setCookies(array("test" => "bar")); - $client->addCookies(array("foo" => "test")); - $client->enqueue($request); - $client->send(); - var_dump($client->getResponse()->getBody()->toString()); - $request->setOptions(array("cookies" => x($client->getCookies()))); - $client->requeue($request); - $client->send(); - var_dump($client->getResponse()->getBody()->toString()); - } + $request->setOptions(array("cookies" => x($client->getCookies()))); + $client->requeue($request); + $client->send(); + + echo $client->getResponse()->getBody()->toString(); }); ?> Done ---EXPECTREGEX-- +--EXPECT-- Test -(?:string\(46\) "Array\n\(\n \[test\] \=\> bar\n \[foo\] \=\> test\n\)\n"\nstring\(46\) "Array\n\(\n \[test\] \=\> test\n \[foo\] \=\> bar\n\)\n"\n)+Done +Array +( + [test] => bar + [foo] => test +) +Array +( + [test] => test + [foo] => bar +) +Done