pierrick                                 Sat, 03 Dec 2011 20:19:53 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=320316

Log:
Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter

Changed paths:
    A   php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt

Added: php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt
===================================================================
--- php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt                        
        (rev 0)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt        2011-12-03 
20:19:53 UTC (rev 320316)
@@ -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"
+}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to