TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FileHandlingUtilityTest Class Reference
Inheritance diagram for FileHandlingUtilityTest:
UnitTestCase BaseTestCase

Public Member Functions

 makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists ()
 
 invalidRelativePathDataProvider ()
 
 getAbsolutePathThrowsExceptionForInvalidRelativePaths ($invalidRelativePath)
 
 validRelativePathDataProvider ()
 
 getAbsolutePathReturnsAbsolutePathForValidRelativePaths ($validRelativePath, $expectedAbsolutePath)
 
 makeAndClearExtensionDirAddsDir ()
 
 makeAndClearExtensionDirThrowsExceptionOnInvalidPath ()
 
 addDirectoryAddsDirectory ()
 
 removeDirectoryRemovesDirectory ()
 
 removeDirectoryRemovesSymlink ()
 
 removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory ()
 
 unpackExtensionFromExtensionDataArrayCreatesTheExtensionDirectory ()
 
 unpackExtensionFromExtensionDataArrayStripsDirectoriesFromFilesArray ()
 
 extractFilesArrayFromExtensionDataReturnsFileArray ()
 
 writeExtensionFilesWritesFiles ()
 
 extractDirectoriesFromExtensionDataExtractsDirectories ()
 
 createDirectoriesForExtensionFilesCreatesDirectories ()
 
 writeEmConfWritesEmConfFile ()
 
 uploadFolderIsNotCreatedIfNotRequested ()
 
 additionalFoldersAreNotCreatedIfNotRequested ()
 
 configuredUploadFolderIsCreatedIfRequested ()
 
 configuredAdditionalDirectoriesAreCreatedIfRequested ()
 
 configuredDirectoriesAreNotCreatedIfTheyAlreadyExist ()
 
 createZipFileFromExtensionGeneratesCorrectArchive ()
 

Protected Member Functions

 createFakeExtension ($extkeyOnly=false)
 
- Protected Member Functions inherited from UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from BaseTestCase
 getAccessibleMock ($originalClassName, $methods=[], array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name,...$arguments)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix= '')
 

Protected Attributes

 $fakedExtensions = []
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Testcase

Definition at line 22 of file FileHandlingUtilityTest.php.

Member Function Documentation

addDirectoryAddsDirectory ( )
Test:
Returns
void

Definition at line 154 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock(), and BaseTestCase\getUniqueId().

additionalFoldersAreNotCreatedIfNotRequested ( )
Test:

Definition at line 484 of file FileHandlingUtilityTest.php.

configuredAdditionalDirectoriesAreCreatedIfRequested ( )
Test:

Definition at line 515 of file FileHandlingUtilityTest.php.

configuredDirectoriesAreNotCreatedIfTheyAlreadyExist ( )
Test:

Definition at line 536 of file FileHandlingUtilityTest.php.

configuredUploadFolderIsCreatedIfRequested ( )
Test:

Definition at line 499 of file FileHandlingUtilityTest.php.

createDirectoriesForExtensionFilesCreatesDirectories ( )
createZipFileFromExtensionGeneratesCorrectArchive ( )

Warning: This test asserts multiple things at once to keep the setup short.

Test:

Definition at line 557 of file FileHandlingUtilityTest.php.

References $GLOBALS, FileHandlingUtilityTest\createFakeExtension(), and BaseTestCase\getAccessibleMock().

extractDirectoriesFromExtensionDataExtractsDirectories ( )
Test:
Returns
void

Definition at line 360 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

extractFilesArrayFromExtensionDataReturnsFileArray ( )
Test:
Returns
void

Definition at line 313 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

getAbsolutePathReturnsAbsolutePathForValidRelativePaths (   $validRelativePath,
  $expectedAbsolutePath 
)
Parameters
string$validRelativePath
string$expectedAbsolutePath
Test:
validRelativePathDataProvider

Definition at line 113 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

getAbsolutePathThrowsExceptionForInvalidRelativePaths (   $invalidRelativePath)
Parameters
string$invalidRelativePath
Test:
invalidRelativePathDataProvider

Definition at line 88 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

invalidRelativePathDataProvider ( )
Returns
array

Definition at line 73 of file FileHandlingUtilityTest.php.

makeAndClearExtensionDirAddsDir ( )
makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists ( )
makeAndClearExtensionDirThrowsExceptionOnInvalidPath ( )
Test:
Returns
void

Definition at line 140 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory ( )
Test:
Returns
void

Definition at line 196 of file FileHandlingUtilityTest.php.

References BaseTestCase\getUniqueId().

removeDirectoryRemovesDirectory ( )
Test:
Returns
void

Definition at line 167 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock(), and BaseTestCase\getUniqueId().

removeDirectoryRemovesSymlink ( )
Test:
Returns
void

Definition at line 180 of file FileHandlingUtilityTest.php.

References BaseTestCase\getUniqueId().

unpackExtensionFromExtensionDataArrayCreatesTheExtensionDirectory ( )
Test:
Returns
void

Definition at line 219 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

unpackExtensionFromExtensionDataArrayStripsDirectoriesFromFilesArray ( )
Test:
Returns
void

Definition at line 243 of file FileHandlingUtilityTest.php.

References BaseTestCase\getAccessibleMock().

uploadFolderIsNotCreatedIfNotRequested ( )
Test:

Definition at line 469 of file FileHandlingUtilityTest.php.

validRelativePathDataProvider ( )
Returns
array

Definition at line 99 of file FileHandlingUtilityTest.php.

writeEmConfWritesEmConfFile ( )
writeExtensionFilesWritesFiles ( )

Member Data Documentation

$fakedExtensions = []
protected

Definition at line 27 of file FileHandlingUtilityTest.php.