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

1.1     ! misho       1: --TEST--
        !             2: Test fileowner() function: basic functionality
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype: int fileowner ( string $filename )
        !             6:  * Description: Returns the user ID of the owner of the file, or
        !             7:  *              FALSE in case of an error.
        !             8:  */
        !             9: 
        !            10: echo "*** Testing fileowner(): basic functionality ***\n"; 
        !            11: 
        !            12: echo "-- Testing with the file or directory created by owner --\n";
        !            13: var_dump( fileowner(__FILE__) );
        !            14: var_dump( fileowner(".") );
        !            15: var_dump( fileowner("./..") );
        !            16: 
        !            17: /* Newly created files and dirs */
        !            18: $file_path = dirname(__FILE__);
        !            19: $file_name = $file_path."/fileowner_basic.tmp";
        !            20: $file_handle = fopen($file_name, "w");
        !            21: $string = "Hello, world\n1234\n123Hello";
        !            22: fwrite($file_handle, $string);
        !            23: var_dump( fileowner($file_name) );
        !            24: fclose($file_handle);
        !            25: 
        !            26: $dir_name = $file_path."/fileowner_basic";
        !            27: mkdir($dir_name);
        !            28: var_dump( fileowner($dir_name) );
        !            29: 
        !            30: echo "*** Done ***\n";
        !            31: ?>
        !            32: 
        !            33: --CLEAN--
        !            34: <?php
        !            35: $file_path = dirname(__FILE__);
        !            36: $file_name = $file_path."/fileowner_basic.tmp";
        !            37: $dir_name = $file_path."/fileowner_basic";
        !            38: unlink($file_name);
        !            39: rmdir($dir_name);
        !            40: ?>
        !            41: 
        !            42: --EXPECTF--
        !            43: *** Testing fileowner(): basic functionality ***
        !            44: -- Testing with the file or directory created by owner --
        !            45: int(%d)
        !            46: int(%d)
        !            47: int(%d)
        !            48: int(%d)
        !            49: int(%d)
        !            50: *** Done ***
        !            51: 

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