Annotation of embedaddon/php/ext/curl/tests/curl_version_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test curl_version() function : error conditions
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("curl")) {
! 6: die('skip - curl extension not available in this build');
! 7: }
! 8: if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
! 9: echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
! 10: }
! 11: ?>
! 12: --FILE--
! 13: <?php
! 14:
! 15: /* Prototype : array curl_version ([ int $age ] )
! 16: * Description: Returns information about the cURL version.
! 17: * Source code: ext/curl/interface.c
! 18: */
! 19:
! 20: echo "*** Testing curl_version() : error conditions ***\n";
! 21:
! 22: echo "\n-- Testing curl_version() function with more than expected no. of arguments --\n";
! 23: $extra_arg = 10;
! 24: var_dump( curl_version(1, $extra_arg) );
! 25:
! 26: ?>
! 27: ===Done===
! 28: --EXPECTF--
! 29: *** Testing curl_version() : error conditions ***
! 30:
! 31: -- Testing curl_version() function with more than expected no. of arguments --
! 32:
! 33: Warning: curl_version() expects at most 1 parameter, 2 given in %s on line %d
! 34: NULL
! 35: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>