Annotation of embedaddon/php/ext/curl/tests/curl_basic_008.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test curl_error() & curl_errno() function with problematic host
! 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.".uniqid().".".uniqid();
! 17: $ch = curl_init();
! 18: curl_setopt($ch, CURLOPT_URL, $url);
! 19:
! 20: curl_exec($ch);
! 21: var_dump(curl_error($ch));
! 22: var_dump(curl_errno($ch));
! 23: curl_close($ch);
! 24:
! 25:
! 26: ?>
! 27: --EXPECTF--
! 28: %unicode|string%(%d) "%r(Couldn't resolve host|Could not resolve host:)%r %Swww.%s"
! 29: int(6)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>