Possible null pointer dereference in php_http_url_mod() fixed.
[m6w6/ext-http] / tests / clientrequest003.phpt
1 --TEST--
2 client request query
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9
10 echo "Test\n";
11
12 $r = new http\Client\Request("GET", "http://localhost/");
13 var_dump(null === $r->getQuery());
14 var_dump($r === $r->setQuery($q = "foo=bar"));
15 var_dump($q === $r->getQuery());
16 var_dump($r === $r->addQuery("a[]=1&a[]=2"));
17 var_dump("foo=bar&a%5B0%5D=1&a%5B1%5D=2" === $r->getQuery());
18 var_dump(null === $r->setQuery(null)->getQuery());
19
20 ?>
21 Done
22 --EXPECT--
23 Test
24 bool(true)
25 bool(true)
26 bool(true)
27 bool(true)
28 bool(true)
29 bool(true)
30 Done