1--TEST--
2Test lchgrp() function : basic functionality
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') die('skip no windows support');
6if (!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
15var_dump( touch( $filename ) );
16var_dump( symlink( $filename, $symlink ) );
17var_dump( lchgrp( $filename, $gid ) );
18var_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';
27unlink($filename);
28unlink($symlink);
29
30?>
31--EXPECTF--
32bool(true)
33bool(true)
34bool(true)
35bool(true)
36===DONE===
37