Skip to content

Commit

Permalink
Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
adoy committed Dec 3, 2011
1 parent 3e7310e commit 56ba384
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ext/curl/tests/curl_basic_022.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,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=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.php.net');
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.php.net');
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));

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

0 comments on commit 56ba384

Please sign in to comment.