\Symfony\Component\Filesystem\TestsFilesystemTest

Test class for Filesystem.

Summary

Methods
Properties
Constants
setUpBeforeClass()
testCopyCreatesNewFile()
testCopyFails()
testCopyUnreadableFileFails()
testCopyOverridesExistingFileIfModified()
testCopyDoesNotOverrideExistingFileByDefault()
testCopyOverridesExistingFileIfForced()
testCopyWithOverrideWithReadOnlyTargetFails()
testCopyCreatesTargetDirectoryIfItDoesNotExist()
testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
testMkdirCreatesDirectoriesRecursively()
testMkdirCreatesDirectoriesFromArray()
testMkdirCreatesDirectoriesFromTraversableObject()
testMkdirCreatesDirectoriesFails()
testTouchCreatesEmptyFile()
testTouchFails()
testTouchCreatesEmptyFilesFromArray()
testTouchCreatesEmptyFilesFromTraversableObject()
testRemoveCleansFilesAndDirectoriesIteratively()
testRemoveCleansArrayOfFilesAndDirectories()
testRemoveCleansTraversableObjectOfFilesAndDirectories()
testRemoveIgnoresNonExistingFiles()
testRemoveCleansInvalidLinks()
testFilesExists()
testFilesExistsFails()
testFilesExistsTraversableObjectOfFilesAndDirectories()
testFilesNotExistsTraversableObjectOfFilesAndDirectories()
testInvalidFileNotExists()
testChmodChangesFileMode()
testChmodWithWrongModLeavesPreviousPermissionsUntouched()
testChmodRecursive()
testChmodAppliesUmask()
testChmodChangesModeOfArrayOfFiles()
testChmodChangesModeOfTraversableFileObject()
testChmodChangesZeroModeOnSubdirectoriesOnRecursive()
testChown()
testChownRecursive()
testChownSymlink()
testChownLink()
testChownSymlinkFails()
testChownLinkFails()
testChownFail()
testChgrp()
testChgrpRecursive()
testChgrpSymlink()
testChgrpLink()
testChgrpSymlinkFails()
testChgrpLinkFails()
testChgrpFail()
testRename()
testRenameThrowsExceptionIfTargetAlreadyExists()
testRenameOverwritesTheTargetIfItAlreadyExists()
testRenameThrowsExceptionOnError()
testSymlink()
testRemoveSymlink()
testSymlinkIsOverwrittenIfPointsToDifferentTarget()
testSymlinkIsNotOverwrittenIfAlreadyCreated()
testSymlinkCreatesTargetDirectoryIfItDoesNotExist()
testLink()
testRemoveLink()
testLinkIsOverwrittenIfPointsToDifferentTarget()
testLinkIsNotOverwrittenIfAlreadyCreated()
testLinkWithSeveralTargets()
testLinkWithSameTarget()
testReadRelativeLink()
testReadAbsoluteLink()
testReadBrokenLink()
testReadLinkDefaultPathDoesNotExist()
testReadLinkDefaultPathNotLink()
testReadLinkCanonicalizePath()
testReadLinkCanonicalizedPathDoesNotExist()
testMakePathRelative()
providePathsForMakePathRelative()
testMakePathRelativeWithRelativeStartPath()
testMakePathRelativeWithRelativeEndPath()
testMirrorCopiesFilesAndDirectoriesRecursively()
testMirrorCreatesEmptyDirectory()
testMirrorCopiesLinks()
testMirrorCopiesLinkedDirectoryContents()
testMirrorCopiesRelativeLinkedContents()
testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()
testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
testIsAbsolutePath()
providePathsForIsAbsolutePath()
testTempnam()
testTempnamWithFileScheme()
testTempnamWithMockScheme()
testTempnamWithZlibSchemeFails()
testTempnamWithPHPTempSchemeFails()
testTempnamWithPharSchemeFails()
testTempnamWithHTTPSchemeFails()
testTempnamOnUnwritableFallsBackToSysTmp()
testDumpFile()
testDumpFileWithArray()
testDumpFileWithResource()
testDumpFileOverwritesAnExistingFile()
testDumpFileWithFileScheme()
testDumpFileWithZlibScheme()
testAppendToFile()
testAppendToFileWithScheme()
testAppendToFileWithZlibScheme()
testAppendToFileCreateTheFileIfNotExists()
testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
testCopyShouldKeepExecutionPermission()
No public properties found
No constants found
setUp()
tearDown()
assertFilePermissions()
getFileOwner()
getFileGroup()
markAsSkippedIfLinkIsMissing()
markAsSkippedIfSymlinkIsMissing()
markAsSkippedIfChmodIsMissing()
markAsSkippedIfPosixIsMissing()
$longPathNamesWindows
$filesystem
$workspace
N/A
normalize()
$umask
$linkOnWindows
$symlinkOnWindows
N/A

Properties

$longPathNamesWindows

$longPathNamesWindows : 

Type

$workspace

$workspace : string

Type

string

$umask

$umask : 

Type

$linkOnWindows

$linkOnWindows : boolean|null

Type

boolean|null — Flag for hard links on Windows

$symlinkOnWindows

$symlinkOnWindows : boolean|null

Type

boolean|null — Flag for symbolic links on Windows

Methods

setUpBeforeClass()

setUpBeforeClass() 

testCopyCreatesNewFile()

testCopyCreatesNewFile() 

testCopyFails()

testCopyFails() 

testCopyUnreadableFileFails()

testCopyUnreadableFileFails() 

testCopyOverridesExistingFileIfModified()

testCopyOverridesExistingFileIfModified() 

testCopyDoesNotOverrideExistingFileByDefault()

testCopyDoesNotOverrideExistingFileByDefault() 

testCopyOverridesExistingFileIfForced()

testCopyOverridesExistingFileIfForced() 

testCopyWithOverrideWithReadOnlyTargetFails()

testCopyWithOverrideWithReadOnlyTargetFails() 

testCopyCreatesTargetDirectoryIfItDoesNotExist()

testCopyCreatesTargetDirectoryIfItDoesNotExist() 

testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()

testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() 

testMkdirCreatesDirectoriesRecursively()

testMkdirCreatesDirectoriesRecursively() 

testMkdirCreatesDirectoriesFromArray()

testMkdirCreatesDirectoriesFromArray() 

testMkdirCreatesDirectoriesFromTraversableObject()

testMkdirCreatesDirectoriesFromTraversableObject() 

testMkdirCreatesDirectoriesFails()

testMkdirCreatesDirectoriesFails() 

testTouchCreatesEmptyFile()

testTouchCreatesEmptyFile() 

testTouchFails()

testTouchFails() 

testTouchCreatesEmptyFilesFromArray()

testTouchCreatesEmptyFilesFromArray() 

testTouchCreatesEmptyFilesFromTraversableObject()

testTouchCreatesEmptyFilesFromTraversableObject() 

testRemoveCleansFilesAndDirectoriesIteratively()

testRemoveCleansFilesAndDirectoriesIteratively() 

testRemoveCleansArrayOfFilesAndDirectories()

testRemoveCleansArrayOfFilesAndDirectories() 

testRemoveCleansTraversableObjectOfFilesAndDirectories()

testRemoveCleansTraversableObjectOfFilesAndDirectories() 

testRemoveIgnoresNonExistingFiles()

testRemoveIgnoresNonExistingFiles() 

testRemoveCleansInvalidLinks()

testRemoveCleansInvalidLinks() 

testFilesExists()

testFilesExists() 

testFilesExistsFails()

testFilesExistsFails() 

testFilesExistsTraversableObjectOfFilesAndDirectories()

testFilesExistsTraversableObjectOfFilesAndDirectories() 

testFilesNotExistsTraversableObjectOfFilesAndDirectories()

testFilesNotExistsTraversableObjectOfFilesAndDirectories() 

testInvalidFileNotExists()

testInvalidFileNotExists() 

testChmodChangesFileMode()

testChmodChangesFileMode() 

testChmodWithWrongModLeavesPreviousPermissionsUntouched()

testChmodWithWrongModLeavesPreviousPermissionsUntouched() 

testChmodRecursive()

testChmodRecursive() 

testChmodAppliesUmask()

testChmodAppliesUmask() 

testChmodChangesModeOfArrayOfFiles()

testChmodChangesModeOfArrayOfFiles() 

testChmodChangesModeOfTraversableFileObject()

testChmodChangesModeOfTraversableFileObject() 

testChmodChangesZeroModeOnSubdirectoriesOnRecursive()

testChmodChangesZeroModeOnSubdirectoriesOnRecursive() 

testChown()

testChown() 

testChownRecursive()

testChownRecursive() 

testChownSymlink()

testChownSymlink() 

testChownLink()

testChownLink() 

testChownSymlinkFails()

testChownSymlinkFails() 

testChownLinkFails()

testChownLinkFails() 

testChownFail()

testChownFail() 

testChgrp()

testChgrp() 

testChgrpRecursive()

testChgrpRecursive() 

testChgrpSymlink()

testChgrpSymlink() 

testChgrpLink()

testChgrpLink() 

testChgrpSymlinkFails()

testChgrpSymlinkFails() 

testChgrpLinkFails()

testChgrpLinkFails() 

testChgrpFail()

testChgrpFail() 

testRename()

testRename() 

testRenameThrowsExceptionIfTargetAlreadyExists()

testRenameThrowsExceptionIfTargetAlreadyExists() 

testRenameOverwritesTheTargetIfItAlreadyExists()

testRenameOverwritesTheTargetIfItAlreadyExists() 

testRenameThrowsExceptionOnError()

testRenameThrowsExceptionOnError() 

testSymlink()

testSymlink() 

testRemoveSymlink()

testRemoveSymlink() 

testSymlinkIsOverwrittenIfPointsToDifferentTarget()

testSymlinkIsOverwrittenIfPointsToDifferentTarget() 

testSymlinkIsNotOverwrittenIfAlreadyCreated()

testSymlinkIsNotOverwrittenIfAlreadyCreated() 

testSymlinkCreatesTargetDirectoryIfItDoesNotExist()

testSymlinkCreatesTargetDirectoryIfItDoesNotExist() 

testLink()

testLink() 

testRemoveLink()

testRemoveLink() 

testLinkIsOverwrittenIfPointsToDifferentTarget()

testLinkIsOverwrittenIfPointsToDifferentTarget() 

testLinkIsNotOverwrittenIfAlreadyCreated()

testLinkIsNotOverwrittenIfAlreadyCreated() 

testLinkWithSeveralTargets()

testLinkWithSeveralTargets() 

testLinkWithSameTarget()

testLinkWithSameTarget() 

testReadRelativeLink()

testReadRelativeLink() 

testReadAbsoluteLink()

testReadAbsoluteLink() 

testReadBrokenLink()

testReadBrokenLink() 

testReadLinkDefaultPathDoesNotExist()

testReadLinkDefaultPathDoesNotExist() 

testReadLinkDefaultPathNotLink()

testReadLinkDefaultPathNotLink() 

testReadLinkCanonicalizePath()

testReadLinkCanonicalizePath() 

testReadLinkCanonicalizedPathDoesNotExist()

testReadLinkCanonicalizedPathDoesNotExist() 

testMakePathRelative()

testMakePathRelative(  $endPath,   $startPath,   $expectedPath) 

Parameters

$endPath
$startPath
$expectedPath

providePathsForMakePathRelative()

providePathsForMakePathRelative() 

testMakePathRelativeWithRelativeStartPath()

testMakePathRelativeWithRelativeStartPath() 

testMakePathRelativeWithRelativeEndPath()

testMakePathRelativeWithRelativeEndPath() 

testMirrorCopiesFilesAndDirectoriesRecursively()

testMirrorCopiesFilesAndDirectoriesRecursively() 

testMirrorCreatesEmptyDirectory()

testMirrorCreatesEmptyDirectory() 

testMirrorCopiesLinks()

testMirrorCopiesLinks() 

testMirrorCopiesLinkedDirectoryContents()

testMirrorCopiesLinkedDirectoryContents() 

testMirrorCopiesRelativeLinkedContents()

testMirrorCopiesRelativeLinkedContents() 

testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()

testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption() 

testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()

testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption() 

testIsAbsolutePath()

testIsAbsolutePath(  $path,   $expectedResult) 

Parameters

$path
$expectedResult

providePathsForIsAbsolutePath()

providePathsForIsAbsolutePath() 

testTempnam()

testTempnam() 

testTempnamWithFileScheme()

testTempnamWithFileScheme() 

testTempnamWithMockScheme()

testTempnamWithMockScheme() 

testTempnamWithZlibSchemeFails()

testTempnamWithZlibSchemeFails() 

testTempnamWithPHPTempSchemeFails()

testTempnamWithPHPTempSchemeFails() 

testTempnamWithPharSchemeFails()

testTempnamWithPharSchemeFails() 

testTempnamWithHTTPSchemeFails()

testTempnamWithHTTPSchemeFails() 

testTempnamOnUnwritableFallsBackToSysTmp()

testTempnamOnUnwritableFallsBackToSysTmp() 

testDumpFile()

testDumpFile() 

testDumpFileWithArray()

testDumpFileWithArray() 

testDumpFileWithResource()

testDumpFileWithResource() 

testDumpFileOverwritesAnExistingFile()

testDumpFileOverwritesAnExistingFile() 

testDumpFileWithFileScheme()

testDumpFileWithFileScheme() 

testDumpFileWithZlibScheme()

testDumpFileWithZlibScheme() 

testAppendToFile()

testAppendToFile() 

testAppendToFileWithScheme()

testAppendToFileWithScheme() 

testAppendToFileWithZlibScheme()

testAppendToFileWithZlibScheme() 

testAppendToFileCreateTheFileIfNotExists()

testAppendToFileCreateTheFileIfNotExists() 

testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()

testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile() 

testCopyShouldKeepExecutionPermission()

testCopyShouldKeepExecutionPermission() 

setUp()

setUp() 

tearDown()

tearDown() 

assertFilePermissions()

assertFilePermissions(integer  $expectedFilePerms, string  $filePath) 

Parameters

integer $expectedFilePerms

Expected file permissions as three digits (i.e. 755)

string $filePath

getFileOwner()

getFileOwner(  $filepath) 

Parameters

$filepath

getFileGroup()

getFileGroup(  $filepath) 

Parameters

$filepath

markAsSkippedIfLinkIsMissing()

markAsSkippedIfLinkIsMissing() 

markAsSkippedIfSymlinkIsMissing()

markAsSkippedIfSymlinkIsMissing(  $relative = false) 

Parameters

$relative

markAsSkippedIfChmodIsMissing()

markAsSkippedIfChmodIsMissing() 

markAsSkippedIfPosixIsMissing()

markAsSkippedIfPosixIsMissing() 

normalize()

normalize(\Symfony\Component\Filesystem\Tests\string  $path) 

Normalize the given path (transform each blackslash into a real directory separator).

Parameters

\Symfony\Component\Filesystem\Tests\string $path