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

1.1       misho       1: --TEST--
                      2: Test strrpos() function : error conditions 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : int strrpos ( string $haystack, string $needle [, int $offset] );
                      6:  * Description: Find position of last occurrence of 'needle' in 'haystack'.
                      7:  * Source code: ext/standard/string.c
                      8: */
                      9: 
                     10: echo "*** Testing strrpos() function: error conditions ***";
                     11: echo "\n-- With Zero arguments --";
                     12: var_dump( strrpos() );
                     13: 
                     14: echo "\n-- With less than expected number of arguments --";
                     15: var_dump( strrpos("String") );
                     16: 
                     17: echo "\n-- With more than expected number of arguments --";
                     18: var_dump( strrpos("string", "String", 1, 'extra_arg') );
                     19: echo "*** Done ***";
                     20: ?>
                     21: --EXPECTF--
                     22: *** Testing strrpos() function: error conditions ***
                     23: -- With Zero arguments --
                     24: Warning: strrpos() expects at least 2 parameters, 0 given in %s on line %d
                     25: bool(false)
                     26: 
                     27: -- With less than expected number of arguments --
                     28: Warning: strrpos() expects at least 2 parameters, 1 given in %s on line %d
                     29: bool(false)
                     30: 
                     31: -- With more than expected number of arguments --
                     32: Warning: strrpos() expects at most 3 parameters, 4 given in %s on line %d
                     33: bool(false)
                     34: *** Done ***

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