Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit55e8d21

Browse files
author
Anthony MARTIN
committed
Remove unnescessary code
1 parenta908ef2 commit55e8d21

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

‎src/Symfony/Component/Filesystem/Tests/FilesystemTest.php‎

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,46 +1348,6 @@ public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
13481348
$this->assertFileNotExists($targetPath.'target');
13491349
}
13501350

1351-
publicfunctiontestMirrorWithCustomIterator()
1352-
{
1353-
$sourcePath =$this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1354-
mkdir($sourcePath);
1355-
1356-
$file =$sourcePath.\DIRECTORY_SEPARATOR.'file';
1357-
file_put_contents($file,'FILE');
1358-
1359-
$targetPath =$this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1360-
1361-
$splFile =new \SplFileInfo($file);
1362-
$iterator =new \ArrayObject([$splFile]);
1363-
1364-
$this->filesystem->mirror($sourcePath,$targetPath,$iterator);
1365-
1366-
$this->assertTrue(is_dir($targetPath));
1367-
$this->assertFileEquals($file,$targetPath.\DIRECTORY_SEPARATOR.'file');
1368-
}
1369-
1370-
/**
1371-
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
1372-
* @expectedExceptionMessageRegExp /Unable to mirror "(.*)" directory/
1373-
*/
1374-
publicfunctiontestMirrorWithCustomIteratorWithRelativePath()
1375-
{
1376-
$sourcePath =$this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1377-
$realSourcePath =$this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1378-
mkdir($realSourcePath);
1379-
1380-
$file =$realSourcePath.'file';
1381-
file_put_contents($file,'FILE');
1382-
1383-
$targetPath =$this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1384-
1385-
$splFile =new \SplFileInfo($file);
1386-
$iterator =new \ArrayObject([$splFile]);
1387-
1388-
$this->filesystem->mirror($sourcePath,$targetPath,$iterator);
1389-
}
1390-
13911351
publicfunctiontestMirrorAvoidCopyingTargetDirectoryIfInSourceDirectory()
13921352
{
13931353
$sourcePath =$this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
@@ -1410,7 +1370,7 @@ public function testMirrorAvoidCopyingTargetDirectoryIfInSourceDirectory()
14101370
$this->assertFileEquals($file1,$targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1');
14111371
$this->assertFileEquals($file2,$targetPath.'file2');
14121372

1413-
$this->assertFileNotExists($targetPath.'target');
1373+
$this->assertFalse(is_dir($targetPath.'target'));
14141374
}
14151375

14161376
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp