Returns whether symlinks are supported in the local environment.
public static isSymlinkSupported ( ) : boolean | ||
return | boolean | Returns `true` if symlinks are supported. |
protected function setUp() { if (!FilesystemRepository::isSymlinkSupported()) { $this->markTestSkipped('Symlinks are not supported'); return; } while (false === @mkdir($this->tempBaseDir = sys_get_temp_dir() . '/puli-repository/FilesystemRepositoryAbsoluteSymlinkTest' . rand(10000, 99999), 0777, true)) { } // Create both directories in the same directory, so that relative links // work from one to the other $this->tempDir = $this->tempBaseDir . '/workspace'; $this->tempFixtures = $this->tempBaseDir . '/fixtures'; mkdir($this->tempDir); mkdir($this->tempFixtures); $filesystem = new Filesystem(); $filesystem->mirror(__DIR__ . '/Fixtures', $this->tempFixtures); parent::setUp(); }