-function cookies($client) {
- foreach ($client->getResponse()->getCookies() as $cookie) {
- echo trim($cookie), "\n";
+function send_and_check($client, $cmp) {
+ global $section, $request;
+ $client->requeue($request)->send();
+ foreach ($client->getResponse()->getCookies() as $list) {
+ foreach ($list->getCookies() as $name => $value) {
+ if ($cmp[$name] != $value) {
+ printf("# %s\nExpected %s=%s, got %s\n",
+ $section, $name, $cmp[$name], $value);
+ }
+ }