Return to lchgrp_basic.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / file |
1.1 misho 1: --TEST-- 2: Test lchgrp() function : basic functionality 3: --SKIPIF-- 4: <?php 5: if (substr(PHP_OS, 0, 3) == 'WIN') die('skip no windows support'); 6: if (!function_exists("posix_getgid")) die("skip no posix_getgid()"); 7: ?> 8: --FILE-- 9: <?php 10: $filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; 11: $symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; 12: 13: $gid = posix_getgid(); 14: 15: var_dump( touch( $filename ) ); 16: var_dump( symlink( $filename, $symlink ) ); 17: var_dump( lchgrp( $filename, $gid ) ); 18: var_dump( filegroup( $symlink ) === $gid ); 19: 20: ?> 21: ===DONE=== 22: --CLEAN-- 23: <?php 24: 25: $filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; 26: $symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; 27: unlink($filename); 28: unlink($symlink); 29: 30: ?> 31: --EXPECTF-- 32: bool(true) 33: bool(true) 34: bool(true) 35: bool(true) 36: ===DONE===