/** * @test */ public function testCreateHardLink() { $file = new Filesystem(); $dir = static::getTempPath(__FUNCTION__); mkdir($dir); $filename = rand(1, 10) . rand(0, getrandmax()); $filename2 = rand(1, 10) . rand(0, getrandmax()); $path1 = $dir . DIRECTORY_SEPARATOR . $filename; $path2 = $dir . DIRECTORY_SEPARATOR . $filename2; touch($path1); $file->createHardLink($path1, $path2); $this->assertEquals(false, is_link($path2)); $this->assertEquals("file", filetype($path2)); }