minor #32140 [Filesystem] add test to avoid regressions (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
[Filesystem] add test to avoid regressions
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
0d7d1f81bc
add test to avoid regressions
This commit is contained in:
commit
57d73fcac3
@ -1348,6 +1348,22 @@ class FilesystemTest extends FilesystemTestCase
|
|||||||
$this->assertFileNotExists($targetPath.'target');
|
$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
|
* @dataProvider providePathsForIsAbsolutePath
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user