merged branch pborreli/filesystem-windows (PR #5088)
Commits -------03c3712
[Filesystem] Fixed 2 tests throwing error on windows3689bb8
[Filesystem] Fixed 3 failing tests on windows Discussion ---------- [Filesystem] Fixed 5 tests on windows Fixing 3 test expecting wrong folders : ``` -'C:\Users\pascal\AppData\Local\Temp\\1343425847694\file' +'C:\Users\pascal\AppData\Local\Temp\1343425847694\file' ``` Fixed 2 tests on Windows caused by symlink function throwing error when first argument is not existent : ``` symlink(): Could not fetch file information(error 2) ```
This commit is contained in:
commit
180f4a66ed
@ -31,7 +31,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
public function setUp()
|
||||
{
|
||||
$this->filesystem = new Filesystem();
|
||||
$this->workspace = sys_get_temp_dir().DIRECTORY_SEPARATOR.time().rand(0, 1000);
|
||||
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().rand(0, 1000);
|
||||
mkdir($this->workspace, 0777, true);
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
mkdir($basePath);
|
||||
mkdir($basePath.'dir');
|
||||
// create symlink to unexisting file
|
||||
symlink($basePath.'file', $basePath.'link');
|
||||
@symlink($basePath.'file', $basePath.'link');
|
||||
|
||||
$this->filesystem->remove($basePath);
|
||||
|
||||
@ -701,6 +701,8 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
$link1 = $this->workspace.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'link';
|
||||
$link2 = $this->workspace.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'subdir'.DIRECTORY_SEPARATOR.'link';
|
||||
|
||||
touch($file);
|
||||
|
||||
$this->filesystem->symlink($file, $link1);
|
||||
$this->filesystem->symlink($file, $link2);
|
||||
|
||||
|
Reference in New Issue
Block a user