client test and fixes
[m6w6/ext-http] / tests / clientresponse002.phpt
1 --TEST--
2 client response cookies
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $request = new http\Client\Request("GET", "http://dev.iworks.at/ext-http/.cookie.php");
12
13 foreach (http\Client::getAvailableDrivers() as $driver) {
14 $client = new http\Client($driver);
15 foreach($client->enqueue($request)->send()->getResponse()->getCookies(0, array("comment")) as $cookies) {
16 var_dump($cookies->toArray());
17 }
18 }
19 ?>
20 Done
21 --EXPECTREGEX--
22 Test
23 (?:array\(7\) \{
24 \["cookies"\]\=\>
25 array\(1\) \{
26 \["temp"\]\=\>
27 string\(13\) "\d+\.\d+"
28 \}
29 \["extras"\]\=\>
30 array\(0\) \{
31 \}
32 \["flags"\]\=\>
33 int\(0\)
34 \["expires"\]\=\>
35 int\(\-1\)
36 \["max\-age"\]\=\>
37 int\(\-1\)
38 \["path"\]\=\>
39 string\(0\) ""
40 \["domain"\]\=\>
41 string\(0\) ""
42 \}
43 array\(7\) \{
44 \["cookies"\]\=\>
45 array\(1\) \{
46 \["perm"\]\=\>
47 string\(13\) "\d+\.\d+"
48 \}
49 \["extras"\]\=\>
50 array\(0\) \{
51 \}
52 \["flags"\]\=\>
53 int\(0\)
54 \["expires"\]\=\>
55 int\(\d+\)
56 \["max\-age"\]\=\>
57 int\(\-1\)
58 \["path"\]\=\>
59 string\(0\) ""
60 \["domain"\]\=\>
61 string\(0\) ""
62 \}
63 )+Done