add test to avoid regressions

This commit is contained in:
Christian Flothmann 2019-06-23 10:51:25 +02:00
parent 4c088b6dae
commit 0d7d1f81bc
1 changed files with 16 additions and 0 deletions

View File

@ -1348,6 +1348,22 @@ class FilesystemTest extends FilesystemTestCase
$this->assertFileNotExists($targetPath.'target');
}
public function testMirrorFromSubdirectoryInToParentDirectory()
{
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR;
$sourcePath = $targetPath.'bar'.\DIRECTORY_SEPARATOR;
$file1 = $sourcePath.'file1';
$file2 = $sourcePath.'file2';
$this->filesystem->mkdir($sourcePath);
file_put_contents($file1, 'FILE1');
file_put_contents($file2, 'FILE2');
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertFileEquals($file1, $targetPath.'file1');
}
/**
* @dataProvider providePathsForIsAbsolutePath
*/