‪TYPO3CMS  ‪main
TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase Class Reference
Inheritance diagram for TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase:
TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest

Protected Member Functions

 getTestDirectory ($prefix='root_')
 
non empty string getTestFilePath ($prefix='file_')
 

Detailed Description

Test case

Definition at line 28 of file FolderStructureTestCase.php.

Member Function Documentation

◆ getTestDirectory()

TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase::getTestDirectory (   $prefix = 'root_')
protected

Create a random directory in the file system and return the path. Created directories are registered for deletion upon test ending.

Parameters
string$prefix

Definition at line 36 of file FolderStructureTestCase.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Core\Core\Environment\getVarPath(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep().

Referenced by TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\existsReturnsTrueIfNodeExists(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\fixPermissionReturnsOkStatusIfPermissionCanBeFixedAndSetsPermissionToCorrectValue(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\getCurrentPermissionReturnsCurrentDirectoryPermission(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArray(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayWithWarningStatusIFileNotExists(), TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getTestFilePath(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isContentCorrectThrowsExceptionIfTargetIsNotAFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsTrueIfNameIsADirectory(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated(), and TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\setContentThrowsExceptionIfTargetIsNotAFile().

◆ getTestFilePath()

non empty string TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase::getTestFilePath (   $prefix = 'file_')
protected

Return a random test filename within a virtual test directory

Returns
‪non-empty-string

Definition at line 51 of file FolderStructureTestCase.php.

References TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getTestDirectory(), and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

Referenced by TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\constructorSetsTargetContentToContentOfTargetContentFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\constructorThrowsExceptionIfTargetContentFileDoesNotExist(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryCreatesDirectory(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsOkStatusIfDirectoryWasCreated(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\createFileCreatesFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\createFileReturnsOkStatusIfFileWasCreated(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\existsReturnsFalseIfNodeNotExists(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\getCurrentPermissionReturnsCurrentFilePermission(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayNoticeStatusIfFileExistsButIsNotWritable(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayWithErrorStatusIfNodeIsNotAFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayWithNoticeStatusIfFileExistsButContentIsNotCorrect(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayWithNoticeStatusIfFileExistsButPermissionAreNotCorrect(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArrayWithOkStatusIfFileExistsAndPermissionAreCorrect(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isContentCorrectReturnsFalseIfTargetContentNotEqualsCurrentContent(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isContentCorrectReturnsTrueIfTargetContentEqualsCurrentContent(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isContentCorrectReturnsTrueIfTargetContentPropertyIsNull(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isFileReturnsTrueIfNameIsFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeDoesNotExist(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\setContentReturnsOkStatusIfContentWasSuccessfullySet(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\setContentSetsContentToFile(), and TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\setContentThrowsExceptionIfTargetContentIsNull().