From: andy wharmby Date: Fri, 17 Jul 2009 20:46:30 +0000 (+0000) Subject: New cURL tests. Tested on Windows, Linux and Linux 64 bit X-Git-Tag: php-5.2.11RC1~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2f934d74bc53a8c9e7fabbfcc1aa93b8f075d3a;p=php New cURL tests. Tested on Windows, Linux and Linux 64 bit --- diff --git a/ext/curl/tests/curl_version_error.phpt b/ext/curl/tests/curl_version_error.phpt new file mode 100644 index 0000000000..f9de8dd326 --- /dev/null +++ b/ext/curl/tests/curl_version_error.phpt @@ -0,0 +1,32 @@ +--TEST-- +Test curl_version() function : error conditions +--SKIPIF-- + +--FILE-- + +===Done=== +--EXPECTF-- +*** Testing curl_version() : error conditions *** + +-- Testing curl_version() function with more than expected no. of arguments -- + +Warning: curl_version() expects at most 1 parameter, 2 given in %s on line %d +NULL +===Done=== diff --git a/ext/curl/tests/curl_version_variation1.phpt b/ext/curl/tests/curl_version_variation1.phpt new file mode 100644 index 0000000000..4b86760994 --- /dev/null +++ b/ext/curl/tests/curl_version_variation1.phpt @@ -0,0 +1,162 @@ +--TEST-- +Test curl_version() function : usage variations - test values for $ascii argument +--SKIPIF-- + +--FILE-- + +===Done=== +--EXPECTF-- +*** Testing curl_version() function: with unexpected inputs for 'age' argument *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(true) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- + +Warning: curl_version() expects parameter 1 to be long, array given in %s on line %d +bool(false) +-- Iteration 11 -- + +Warning: curl_version() expects parameter 1 to be long, array given in %s on line %d +bool(false) +-- Iteration 12 -- + +Warning: curl_version() expects parameter 1 to be long, array given in %s on line %d +bool(false) +-- Iteration 13 -- + +Warning: curl_version() expects parameter 1 to be long, string given in %s on line %d +bool(false) +-- Iteration 14 -- + +Warning: curl_version() expects parameter 1 to be long, string given in %s on line %d +bool(false) +-- Iteration 15 -- + +Notice: A non well formed numeric value encountered in %s on line %d +bool(true) +-- Iteration 16 -- +bool(true) +-- Iteration 17 -- +bool(true) +-- Iteration 18 -- +bool(true) +-- Iteration 19 -- +bool(true) +-- Iteration 20 -- +bool(true) +-- Iteration 21 -- +bool(true) +-- Iteration 22 -- + +Warning: curl_version() expects parameter 1 to be long, object given in %s on line %d +bool(false) +-- Iteration 23 -- + +Warning: curl_version() expects parameter 1 to be long, resource given in %s on line %d +bool(false) +-- Iteration 24 -- +bool(true) +-- Iteration 25 -- +bool(true) +===Done===