fix logger
[m6w6/ext-http] / tests / params016.phpt
1 --TEST--
2 header params rfc5988
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $link = <<<EOF
12 <https://api.github.com/search/code?q=addClass+user%3Amozilla&page=2>; rel="next", <https://api.github.com/search/code?q=addClass+user%3Amozilla&page=34>; rel="last"
13 EOF;
14
15 $p = new http\Params($link, ",", ";", "=",
16 http\Params::PARSE_RFC5988 | http\Params::PARSE_ESCAPED);
17 var_dump($p->params);
18 var_dump((string)$p);
19 ?>
20 ===DONE===
21 --EXPECT--
22 Test
23 array(2) {
24 ["https://api.github.com/search/code?q=addClass+user%3Amozilla&page=2"]=>
25 array(2) {
26 ["value"]=>
27 bool(true)
28 ["arguments"]=>
29 array(1) {
30 ["rel"]=>
31 string(4) "next"
32 }
33 }
34 ["https://api.github.com/search/code?q=addClass+user%3Amozilla&page=34"]=>
35 array(2) {
36 ["value"]=>
37 bool(true)
38 ["arguments"]=>
39 array(1) {
40 ["rel"]=>
41 string(4) "last"
42 }
43 }
44 }
45 string(162) "<https://api.github.com/search/code?q=addClass+user%3Amozilla&page=2>;rel="next",<https://api.github.com/search/code?q=addClass+user%3Amozilla&page=34>;rel="last""
46 ===DONE===