X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fclient021.phpt;h=ebb9b0e8003eba5c826625e952de2233fa19a6ae;hb=acea30f21c2af260a9a1cfa637a54931fd784218;hp=1335aaa8ebe80bd9f0c068ea4e3921a1d54b229a;hpb=e867316f1364f589eec67cc684703c874984430b;p=m6w6%2Fext-http diff --git a/tests/client021.phpt b/tests/client021.phpt index 1335aaa..ebb9b0e 100644 --- a/tests/client021.phpt +++ b/tests/client021.phpt @@ -12,42 +12,58 @@ include "helper/server.inc"; echo "Test\n"; +function dump($f) { + return; + readfile($f); +} + $tmpfile = tempnam(sys_get_temp_dir(), "cookie."); $request = new http\Client\Request("GET", "http://localhost"); $request->setOptions(array("cookiestore" => $tmpfile)); -server("cookie.inc", function($port) use($request) { +server("cookie.inc", function($port) use($request, $tmpfile) { $request->setOptions(array("port" => $port)); $client = new http\Client; echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); }); - -server("cookie.inc", function($port) use($request) { +server("cookie.inc", function($port) use($request, $tmpfile) { $request->setOptions(array("port" => $port)); $client = new http\Client; echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +#dump($tmpfile); }); - -server("cookie.inc", function($port) use($request) { + +server("cookie.inc", function($port) use($request, $tmpfile) { $request->setOptions(array("port" => $port, "cookiesession" => true)); $client = new http\Client; echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); }); - -server("cookie.inc", function($port) use($request) { + +server("cookie.inc", function($port) use($request, $tmpfile) { $request->setOptions(array("port" => $port, "cookiesession" => false)); $client = new http\Client; echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); echo $client->requeue($request)->send()->getResponse(); +dump($tmpfile); }); - + unlink($tmpfile); ?>