Annotation of embedaddon/php/ext/curl/tests/curl_copy_handle_variation1.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test curl_copy_handle() change options in one handle
        !             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: 
        !            20: // copy the handle
        !            21: $ch2 = curl_copy_handle($ch);
        !            22: 
        !            23: // change the CURLOPT_URL for the second handle
        !            24: curl_setopt($ch2, CURLOPT_URL, 'http://www.bar.com/');
        !            25: 
        !            26: var_dump(curl_getinfo($ch) === curl_getinfo($ch2));
        !            27: ?>
        !            28: ===DONE===
        !            29: --EXPECTF--
        !            30: *** Testing curl_copy_handle(): basic ***
        !            31: bool(false)
        !            32: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>