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