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