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

1.1       misho       1: --TEST--
                      2: Test md5() function : error conditions
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : string md5  ( string $str  [, bool $raw_output= false  ] )
                      6:  * Description: Calculate the md5 hash of a string
                      7:  * Source code: ext/standard/md5.c
                      8: */
                      9: 
                     10: echo "*** Testing md5() : error conditions ***\n";
                     11: 
                     12: echo "\n-- Testing md5() function with no arguments --\n";
                     13: var_dump( md5());
                     14: 
                     15: echo "\n-- Testing md5() function with more than expected no. of arguments --\n";
                     16: $str = "Hello World";
                     17: $raw_output = true;
                     18: $extra_arg = 10;
                     19: 
                     20: var_dump(md5($str, $raw_output, $extra_arg));
                     21: ?>
                     22: ===DONE==
                     23: --EXPECTF--
                     24: *** Testing md5() : error conditions ***
                     25: 
                     26: -- Testing md5() function with no arguments --
                     27: 
                     28: Warning: md5() expects at least 1 parameter, 0 given in %s on line %d
                     29: NULL
                     30: 
                     31: -- Testing md5() function with more than expected no. of arguments --
                     32: 
                     33: Warning: md5() expects at most 2 parameters, 3 given in %s on line %d
                     34: NULL
                     35: ===DONE==

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