1--TEST-- 2Test filegroup() function: usage variations - links 3--CREDITS-- 4Dave Kelsey <d_kelsey@uk.ibm.com> 5--SKIPIF-- 6<?php 7if (substr(PHP_OS, 0, 3) == 'WIN') { 8 die('skip Do not run on Windows'); 9} 10--FILE-- 11<?php 12/* Creating soft and hard links to a file and applying filegroup() on links */ 13 14$file_path = __DIR__; 15fclose( fopen($file_path."/filegroup_variation1.tmp", "w") ); 16 17echo "*** Testing filegroup() with links ***\n"; 18/* With symlink */ 19symlink($file_path."/filegroup_variation1.tmp", $file_path."/filegroup_variation1_symlink.tmp"); 20var_dump( filegroup($file_path."/filegroup_variation1_symlink.tmp") ); //expected true 21clearstatcache(); 22 23/* With hardlink */ 24link($file_path."/filegroup_variation1.tmp", $file_path."/filegroup_variation1_link.tmp"); 25var_dump( filegroup($file_path."/filegroup_variation1_link.tmp") ); // expected: true 26clearstatcache(); 27 28echo "\n*** Done ***"; 29?> 30--CLEAN-- 31<?php 32$file_path = __DIR__; 33unlink($file_path."/filegroup_variation1_symlink.tmp"); 34unlink($file_path."/filegroup_variation1_link.tmp"); 35unlink($file_path."/filegroup_variation1.tmp"); 36?> 37--EXPECTF-- 38*** Testing filegroup() with links *** 39int(%d) 40int(%d) 41 42*** Done *** 43