Annotation of embedaddon/php/ext/standard/tests/file/fstat_variation1.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test function fstat() by substituting agument 1 with array values.
        !             3: --FILE--
        !             4: <?php
        !             5: $index_array = array(1, 2, 3);
        !             6: $assoc_array = array(1 => 'one', 2 => 'two');
        !             7: 
        !             8: $variation_array = array(
        !             9:   'empty array' => array(),
        !            10:   'int indexed array' => $index_array,
        !            11:   'associative array' => $assoc_array,
        !            12:   'nested arrays' => array('foo', $index_array, $assoc_array),
        !            13:   );
        !            14: 
        !            15: 
        !            16: foreach ( $variation_array as $var ) {
        !            17:   var_dump(fstat( $var  ) );
        !            18: }
        !            19: ?>
        !            20: ===DONE===
        !            21: --EXPECTF--
        !            22: 
        !            23: Warning: fstat() expects parameter 1 to be resource, array given in %s on line %d
        !            24: bool(false)
        !            25: 
        !            26: Warning: fstat() expects parameter 1 to be resource, array given in %s on line %d
        !            27: bool(false)
        !            28: 
        !            29: Warning: fstat() expects parameter 1 to be resource, array given in %s on line %d
        !            30: bool(false)
        !            31: 
        !            32: Warning: fstat() expects parameter 1 to be resource, array given in %s on line %d
        !            33: bool(false)
        !            34: ===DONE===

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