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