10 $c = new http\Cookie("e0=1; c1=v1; e2=2; c2=v2", 0, array("c0", "c1", "c2"));
11 var_dump(array("c1"=>"v1", "c2"=>"v2") === $c->getExtras());
12 var_dump(array("e0"=>"1", "e2"=>"2") === $c->getCookies());
13 $c->addCookie("e1", 1);
15 $c->setCookie("e3", 123);
16 var_dump("123" === $c->getCookie("e3"));
18 var_dump(array("e2"=>"2", "e1"=>"1") === $c->getCookies());
19 var_dump("e2=2; e1=1; c1=v1; c2=v2; " === $c->toString());
20 $c->addCookies(array("e3"=>3, "e4"=>4));
21 var_dump(array("e2"=>"2", "e1"=>"1", "e3"=>"3", "e4"=>"4") === $c->getCookies());
22 var_dump("e2=2; e1=1; e3=3; e4=4; c1=v1; c2=v2; " === $c->toString());
23 $c->setCookies(array("e"=>"x"));
24 var_dump(array("e"=>"x") === $c->getCookies());
25 var_dump("e=x; c1=v1; c2=v2; " === $c->toString());
27 var_dump(array() === $c->getCookies());
28 var_dump("c1=v1; c2=v2; " === $c->toString());