summaryrefslogtreecommitdiff
path: root/ext/curl/tests/curl_basic_022.phpt
blob: d4277a3f899661c935654cc9a9b7b39818919637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Test curl_getinfo() function with CURLINFO_COOKIELIST parameter
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip"; 
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x070e01) {
	    exit("skip: test works only with curl >= 7.14.1");
}
?>
--FILE--
<?php

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));

?>
--EXPECT--
array(2) {
  [0]=>
  string(38) ".php.net	TRUE	/	FALSE	2145916799	C1	v1"
  [1]=>
  string(38) ".php.net	TRUE	/	FALSE	2145916799	C2	v2"
}