unfold cookie tests and fix variable type inconsitency
[m6w6/ext-http] / tests / cookie009.phpt
1 --TEST--
2 cookies domain
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $c = new http\Cookie("this=has a domain; domain=.example.com; ");
12 var_dump($c->getCookie("this"));
13 var_dump((string)$c);
14 var_dump($c->getDomain());
15 $o = clone $c;
16 $d = "sub.example.com";
17 $o->setDomain();
18 var_dump($o->getDomain());
19 var_dump($c->getDomain());
20 $o->setDomain($d);
21 var_dump($o->getDomain());
22 var_dump($c->getDomain());
23 var_dump($o->toString());
24
25 ?>
26 DONE
27 --EXPECT--
28 Test
29 string(12) "has a domain"
30 string(44) "this=has%20a%20domain; domain=.example.com; "
31 string(12) ".example.com"
32 NULL
33 string(12) ".example.com"
34 string(15) "sub.example.com"
35 string(12) ".example.com"
36 string(47) "this=has%20a%20domain; domain=sub.example.com; "
37 DONE