curl_copy_handle_basic.phpt [plain text]
--TEST--
Test curl_copy_handle() function with basic functionality
--CREDITS--
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
?>
--FILE--
<?php
echo "*** Testing curl_copy_handle(): basic ***\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
curl_setopt($ch, CURLOPT_HEADER, 0);
$ch2 = curl_copy_handle($ch);
var_dump(curl_getinfo($ch) === curl_getinfo($ch2));
?>
===DONE===
--EXPECTF--
*** Testing curl_copy_handle(): basic ***
bool(true)
===DONE===