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

1.1       misho       1: --TEST--
                      2: Test is_readable() function: error conditions
                      3: --FILE--
                      4: <?php
                      5: /* Prototype: bool is_readable ( string $filename );
                      6:    Description: Tells whether the filename is readable
                      7: */
                      8: 
                      9: echo "*** Testing is_readable(): error conditions ***\n";
                     10: var_dump( is_readable() );  // args < expected
                     11: var_dump( is_readable(1, 2) );  // args > expected
                     12: 
                     13: echo "\n*** Testing is_readable() on non-existent file ***\n";
                     14: var_dump( is_readable(dirname(__FILE__)."/is_readable.tmp") );
                     15: 
                     16: echo "Done\n";
                     17: ?>
                     18: --EXPECTF--
                     19: *** Testing is_readable(): error conditions ***
                     20: 
                     21: Warning: is_readable() expects exactly 1 parameter, 0 given in %s on line %d
                     22: NULL
                     23: 
                     24: Warning: is_readable() expects exactly 1 parameter, 2 given in %s on line %d
                     25: NULL
                     26: 
                     27: *** Testing is_readable() on non-existent file ***
                     28: bool(false)
                     29: Done

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