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

1.1       misho       1: --TEST--
                      2: Test function fstat() by substituting agument 1 with emptyUnsetUndefNull values.
                      3: --FILE--
                      4: <?php
                      5: $unset_var = 10;
                      6: unset($unset_var);
                      7: 
                      8: $variation_array = array(
                      9:   'unset var' => @$unset_var,
                     10:   'undefined var' => @$undefined_var,
                     11:   'empty string DQ' => "",
                     12:   'empty string SQ' => '',
                     13:   'uppercase NULL' => NULL,
                     14:   'lowercase null' => null,
                     15:   );
                     16: 
                     17: 
                     18: foreach ( $variation_array as $var ) {
                     19:   var_dump(fstat( $var  ) );
                     20: }
                     21: ?>
                     22: ===DONE===
                     23: --EXPECTF--
                     24: 
                     25: Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
                     26: bool(false)
                     27: 
                     28: Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
                     29: bool(false)
                     30: 
                     31: Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
                     32: bool(false)
                     33: 
                     34: Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
                     35: bool(false)
                     36: 
                     37: Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
                     38: bool(false)
                     39: 
                     40: Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
                     41: bool(false)
                     42: ===DONE===

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