Annotation of embedaddon/php/ext/standard/tests/strings/strrchr_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strrchr() function : error conditions 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : string strrchr(string $haystack, string $needle);
                      6:  * Description: Finds the last occurrence of a character in a string. 
                      7:  * Source code: ext/standard/string.c
                      8: */
                      9: 
                     10: echo "*** Testing strrchr() function: error conditions ***\n";
                     11: $haystack = "Hello";
                     12: $needle = "Hello";
                     13: $extra_arg = "Hello";
                     14: 
                     15: echo "\n-- Testing strrchr() function with Zero arguments --";
                     16: var_dump( strrchr() );
                     17: 
                     18: echo "\n-- Testing strrchr() function with less than expected no. of arguments --";
                     19: var_dump( strrchr($haystack) );
                     20: 
                     21: echo "\n-- Testing strrchr() function with more than expected no. of arguments --";
                     22: var_dump( strrchr($haystack, $needle, $extra_arg) );
                     23: 
                     24: echo "*** Done ***";
                     25: ?>
                     26: --EXPECTF--
                     27: *** Testing strrchr() function: error conditions ***
                     28: 
                     29: -- Testing strrchr() function with Zero arguments --
                     30: Warning: strrchr() expects exactly 2 parameters, 0 given in %s on line %d
                     31: NULL
                     32: 
                     33: -- Testing strrchr() function with less than expected no. of arguments --
                     34: Warning: strrchr() expects exactly 2 parameters, 1 given in %s on line %d
                     35: NULL
                     36: 
                     37: -- Testing strrchr() function with more than expected no. of arguments --
                     38: Warning: strrchr() expects exactly 2 parameters, 3 given in %s on line %d
                     39: NULL
                     40: *** Done ***

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>