Annotation of embedaddon/php/ext/standard/tests/file/file_exists_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test file_exists() function : error conditions 
                      3: --CREDITS--
                      4: Dave Kelsey <d_kelsey@uk.ibm.com>
                      5: --FILE--
                      6: <?php
                      7: /* Prototype  : proto bool file_exists(string filename)
                      8:  * Description: Returns true if filename exists 
                      9:  * Source code: ext/standard/filestat.c
                     10:  * Alias to functions: 
                     11:  */
                     12: 
                     13: echo "*** Testing file_exists() : error conditions ***\n";
                     14: 
                     15: // Zero arguments
                     16: echo "\n-- Testing file_exists() function with Zero arguments --\n";
                     17: var_dump( file_exists() );
                     18: 
                     19: //Test file_exists with one more than the expected number of arguments
                     20: echo "\n-- Testing file_exists() function with more than expected no. of arguments --\n";
                     21: $filename = 'string_val';
                     22: $extra_arg = 10;
                     23: var_dump( file_exists($filename, $extra_arg) );
                     24: 
                     25: echo "Done";
                     26: ?>
                     27: --EXPECTF--
                     28: *** Testing file_exists() : error conditions ***
                     29: 
                     30: -- Testing file_exists() function with Zero arguments --
                     31: 
                     32: Warning: file_exists() expects exactly 1 parameter, 0 given in %s on line %d
                     33: NULL
                     34: 
                     35: -- Testing file_exists() function with more than expected no. of arguments --
                     36: 
                     37: Warning: file_exists() expects exactly 1 parameter, 2 given in %s on line %d
                     38: NULL
                     39: Done
                     40: 

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