Annotation of embedaddon/php/ext/curl/tests/curl_basic_010.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test curl_error() & curl_errno() function with problematic proxy
                      3: --CREDITS--
                      4: TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
                      5: --SKIPIF--
                      6: <?php
                      7:        if (!extension_loaded("curl")) print "skip";
                      8:        $addr = "www.".uniqid().".".uniqid();
                      9:        if (gethostbyname($addr) != $addr) {
                     10:                print "skip catch all dns";
                     11:        }
                     12: ?>
                     13: --FILE--
                     14: <?php
                     15: 
                     16: $url = "http://www.example.org";
                     17: $ch = curl_init();
                     18: curl_setopt($ch, CURLOPT_PROXY, uniqid().":".uniqid());
                     19: curl_setopt($ch, CURLOPT_URL, $url);
                     20: 
                     21: curl_exec($ch);
                     22: var_dump(curl_error($ch));
                     23: var_dump(curl_errno($ch));
                     24: curl_close($ch);
                     25: 
                     26: 
                     27: ?>
                     28: --EXPECTF--
                     29: %unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:)%r %s"
                     30: int(5)

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