Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / standard / tests / url / rawurlencode_error_001.phpt
blob7acce9e0c454e26d4b883073a3dbb28043a993fe
1 --TEST--
2 Test rawurlencode() function : error conditions 
3 --FILE--
4 <?php
5 /* Prototype  : proto string rawurlencode(string str)
6  * Description: URL-encodes string 
7  * Source code: ext/standard/url.c
8  * Alias to functions: 
9  */
11 // NB: basic functionality tested in tests/strings/001.phpt
13 echo "*** Testing rawurlencode() : error conditions ***\n";
15 // Zero arguments
16 echo "\n-- Testing rawurlencode() function with Zero arguments --\n";
17 var_dump( rawurlencode() );
19 //Test rawurlencode with one more than the expected number of arguments
20 echo "\n-- Testing rawurlencode() function with more than expected no. of arguments --\n";
21 $str = 'string_val';
22 $extra_arg = 10;
23 var_dump( rawurlencode($str, $extra_arg) );
25 echo "Done";
27 --EXPECTF--
28 *** Testing rawurlencode() : error conditions ***
30 -- Testing rawurlencode() function with Zero arguments --
32 Warning: rawurlencode() expects exactly 1 parameter, 0 given in %s on line 14
33 NULL
35 -- Testing rawurlencode() function with more than expected no. of arguments --
37 Warning: rawurlencode() expects exactly 1 parameter, 2 given in %s on line 20
38 NULL
39 Done