Annotation of embedaddon/php/ext/curl/tests/curl_copy_handle_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test curl_copy_handle() function with basic functionality
! 3: --CREDITS--
! 4: Francesco Fullone ff@ideato.it
! 5: #PHPTestFest Cesena Italia on 2009-06-20
! 6: --SKIPIF--
! 7: <?php
! 8: if (!extension_loaded("curl")) exit("skip curl extension not loaded");
! 9: ?>
! 10: --FILE--
! 11: <?php
! 12: echo "*** Testing curl_copy_handle(): basic ***\n";
! 13:
! 14: // create a new cURL resource
! 15: $ch = curl_init();
! 16:
! 17: // set URL and other appropriate options
! 18: curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
! 19: curl_setopt($ch, CURLOPT_HEADER, 0);
! 20:
! 21: // copy the handle
! 22: $ch2 = curl_copy_handle($ch);
! 23:
! 24: var_dump(curl_getinfo($ch) === curl_getinfo($ch2));
! 25: ?>
! 26: ===DONE===
! 27: --EXPECTF--
! 28: *** Testing curl_copy_handle(): basic ***
! 29: bool(true)
! 30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>