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

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

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