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 = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt';
11$symlink = __DIR__ . 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--CLEAN--
22<?php
23
24$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt';
25$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'symlink.txt';
26unlink($filename);
27unlink($symlink);
28
29?>
30--EXPECT--
31bool(true)
32bool(true)
33bool(true)
34bool(true)
35