Annotation of embedaddon/php/ext/standard/tests/strings/soundex_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test soundex() function : error conditions
3: --FILE--
4: <?php
5: /* Prototype : string soundex ( string $str )
6: * Description: Calculate the soundex key of a string
7: * Source code: ext/standard/string.c
8: */
9:
10: echo "\n*** Testing soundex error conditions ***";
11:
12: echo "-- Testing soundex() function with Zero arguments --\n";
13: var_dump( soundex() );
14:
15: echo "\n\n-- Testing soundex() function with more than expected no. of arguments --\n";
16: $str = "Euler";
17: $extra_arg = 10;
18: var_dump( soundex( $str, $extra_arg) );
19:
20: ?>
21: ===DONE===
22: --EXPECTF--
23: *** Testing soundex error conditions ***-- Testing soundex() function with Zero arguments --
24:
25: Warning: soundex() expects exactly 1 parameter, 0 given in %s on line %d
26: NULL
27:
28:
29: -- Testing soundex() function with more than expected no. of arguments --
30:
31: Warning: soundex() expects exactly 1 parameter, 2 given in %s on line %d
32: NULL
33:
34: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>