PHP Class Kraken\_Unit\Filesystem\FilesystemTest

Inheritance: extends Kraken\Test\TUnit
Datei anzeigen Open project: kraken-php/framework

Public Methods

Method Description
createFilesystem ( $internal ) : Kraken\Filesystem\FilesystemInterface
expect ( $method, $args = [], $times = 1 ) : Prophecy\Prophecy\MethodProphecy
prevent ( $method, $args = [] ) : Prophecy\Prophecy\MethodProphecy
setUp ( )
testApiAppend_CallsUpdateOnModel_WithExistingContents ( )
testApiAppend_ThrowsException_WhenReadThrowsException ( )
testApiAppend_ThrowsException_WhenUpdateThrowsException ( )
testApiCopyFile_CallsCopyOnModel ( )
testApiCopyFile_ThrowsException_WhenModelThrowsException ( )
testApiCreateFile_CallsWriteOnModel_WithConfig ( )
testApiCreateFile_ThrowsException_WhenLegueWriteThrowsException ( )
testApiCreate_CallsWriteOnModel_WithConfig ( )
testApiCreate_ThrowsException_WhenLegueWriteThrowsException ( )
testApiEraseFile_CallsUpdateOnModel ( )
testApiEraseFile_ThrowsException_WhenUpdateOnModelThrowsException ( )
testApiExists_ReturnsFalse_WhenModelHasReturnsFalse ( )
testApiExists_ReturnsTrue_WhenModelHasReturnsTrue ( )
testApiExists_ThrowsException_WhenModelHasThrowsException ( )
testApiGetMimetype_ReturnsMimetype_UsingGetMetadataOnModel ( )
testApiGetMimetype_ThrowsException_WhenGetMetadataOnModelThrowsException ( )
testApiGetSize_CallsGetSizeOnModel ( )
testApiGetSize_ThrowsException_WhenGetSizeOnModelThrowsException ( )
testApiGetTimestamp_ReturnsMimetype_UsingGetMetadataOnModel ( )
testApiGetTimestamp_ThrowsException_WhenGetMetadataOnModelThrowsException ( )
testApiGetType_ReturnsType_UsingGetMetadataOnModel ( )
testApiGetType_ThrowsException_WhenGetMetadataOnModelThrowsException ( )
testApiGetVisibility_ReturnsSameValue_AsModelGetVisibility ( )
testApiGetVisibility_ThrowsException_WhenModelThrowsException ( )
testApiIsDir_ReturnsFalse_WhenModelDoesNotReturnMetadataForDir ( )
testApiIsDir_ReturnsTrue_WhenModelReturnsMetadataForDir ( )
testApiIsDir_ThrowsException_WhenModelThrowsException ( )
testApiIsFile_ReturnsFalse_WhenModelDoesNotReturnMetadataForFile ( )
testApiIsFile_ReturnsTrue_WhenModelReturnsMetadataForFile ( )
testApiIsFile_ThrowsException_WhenModelThrowsException ( )
testApiIsPrivate_RethrowsException ( )
testApiIsPrivate_ReturnsFalse_WhenVisibilityIsNotPrivate ( )
testApiIsPrivate_ReturnsTrue_WhenVisibilityIsPrivate ( )
testApiIsPublic_RethrowsException ( )
testApiIsPublic_ReturnsFalse_WhenVisibilityIsNotPublic ( )
testApiIsPublic_ReturnsTrue_WhenVisibilityIsPublic ( )
testApiMove_ReturnsNull_WhenModelMoveReturnsTrue ( )
testApiMove_ThrowsException_WhenModelMoveReturnsFalse ( )
testApiMove_ThrowsException_WhenModelMoveThrowsException ( )
testApiPrepend_CallsUpdateOnModel_WithExistingContents ( )
testApiPrepend_ThrowsException_WhenReadThrowsException ( )
testApiPrepend_ThrowsException_WhenUpdateThrowsException ( )
testApiRead_ReturnsReadString_WhenReadWasSuccessful ( )
testApiRead_ThrowsException_WhenModelReadThrowsException ( )
testApiRead_ThrowsException_WhenReadWasNotSuccessful ( )
testApiRemoveFile_CallsDeleteOnModel ( )
testApiRemoveFile_ThrowsException_WhenDeleteOnModelThrowsException ( )
testApiReq_ThrowsException_WhenModelReadThrowsException ( )
testApiReq_UsesEvalToIncludePhpFilesFromExternalSources ( )
testApiSetPrivate_SetsPrivate_WhenSettingIsPossible ( )
testApiSetPrivate_ThrowsException_WhenModelThrows ( )
testApiSetPrivate_ThrowsException_WhenSettingIsNotPossible ( )
testApiSetPublic_SetsPublic_WhenSettingIsPossible ( )
testApiSetPublic_ThrowsException_WhenModelThrows ( )
testApiSetPublic_ThrowsException_WhenSettingIsNotPossible ( )
testApiSetVisibility_SetsVisibility_WhenSettingIsPossible ( )
testApiSetVisibility_ThrowsException_WhenModelThrows ( )
testApiSetVisibility_ThrowsException_WhenSettingIsNotPossible ( )
testApiWrite_CallsPutOnModel_WithConfig ( )
testApiWrite_ThrowsException_WhenModelPutThrowsException ( )

Private Methods

Method Description
prepareConfig ( $visibility ) : string[]

Method Details

createFilesystem() public method

public createFilesystem ( $internal ) : Kraken\Filesystem\FilesystemInterface
return Kraken\Filesystem\FilesystemInterface

expect() public method

public expect ( $method, $args = [], $times = 1 ) : Prophecy\Prophecy\MethodProphecy
return Prophecy\Prophecy\MethodProphecy

prevent() public method

public prevent ( $method, $args = [] ) : Prophecy\Prophecy\MethodProphecy
return Prophecy\Prophecy\MethodProphecy

setUp() public method

public setUp ( )

testApiAppend_CallsUpdateOnModel_WithExistingContents() public method

testApiAppend_ThrowsException_WhenReadThrowsException() public method

testApiAppend_ThrowsException_WhenUpdateThrowsException() public method

testApiCopyFile_CallsCopyOnModel() public method

testApiCopyFile_ThrowsException_WhenModelThrowsException() public method

testApiCreateFile_CallsWriteOnModel_WithConfig() public method

testApiCreateFile_ThrowsException_WhenLegueWriteThrowsException() public method

testApiCreate_CallsWriteOnModel_WithConfig() public method

testApiCreate_ThrowsException_WhenLegueWriteThrowsException() public method

testApiEraseFile_CallsUpdateOnModel() public method

testApiEraseFile_ThrowsException_WhenUpdateOnModelThrowsException() public method

testApiExists_ReturnsFalse_WhenModelHasReturnsFalse() public method

testApiExists_ReturnsTrue_WhenModelHasReturnsTrue() public method

testApiExists_ThrowsException_WhenModelHasThrowsException() public method

testApiGetMimetype_ReturnsMimetype_UsingGetMetadataOnModel() public method

testApiGetMimetype_ThrowsException_WhenGetMetadataOnModelThrowsException() public method

testApiGetSize_CallsGetSizeOnModel() public method

testApiGetSize_ThrowsException_WhenGetSizeOnModelThrowsException() public method

testApiGetTimestamp_ReturnsMimetype_UsingGetMetadataOnModel() public method

testApiGetTimestamp_ThrowsException_WhenGetMetadataOnModelThrowsException() public method

testApiGetType_ReturnsType_UsingGetMetadataOnModel() public method

testApiGetType_ThrowsException_WhenGetMetadataOnModelThrowsException() public method

testApiGetVisibility_ReturnsSameValue_AsModelGetVisibility() public method

testApiGetVisibility_ThrowsException_WhenModelThrowsException() public method

testApiIsDir_ReturnsFalse_WhenModelDoesNotReturnMetadataForDir() public method

testApiIsDir_ReturnsTrue_WhenModelReturnsMetadataForDir() public method

testApiIsDir_ThrowsException_WhenModelThrowsException() public method

testApiIsFile_ReturnsFalse_WhenModelDoesNotReturnMetadataForFile() public method

testApiIsFile_ReturnsTrue_WhenModelReturnsMetadataForFile() public method

testApiIsFile_ThrowsException_WhenModelThrowsException() public method

testApiIsPrivate_RethrowsException() public method

testApiIsPrivate_ReturnsFalse_WhenVisibilityIsNotPrivate() public method

testApiIsPrivate_ReturnsTrue_WhenVisibilityIsPrivate() public method

testApiIsPublic_RethrowsException() public method

testApiIsPublic_ReturnsFalse_WhenVisibilityIsNotPublic() public method

testApiIsPublic_ReturnsTrue_WhenVisibilityIsPublic() public method

testApiMove_ReturnsNull_WhenModelMoveReturnsTrue() public method

testApiMove_ThrowsException_WhenModelMoveReturnsFalse() public method

testApiMove_ThrowsException_WhenModelMoveThrowsException() public method

testApiPrepend_CallsUpdateOnModel_WithExistingContents() public method

testApiPrepend_ThrowsException_WhenReadThrowsException() public method

testApiPrepend_ThrowsException_WhenUpdateThrowsException() public method

testApiRead_ReturnsReadString_WhenReadWasSuccessful() public method

testApiRead_ThrowsException_WhenModelReadThrowsException() public method

testApiRead_ThrowsException_WhenReadWasNotSuccessful() public method

testApiRemoveFile_CallsDeleteOnModel() public method

testApiRemoveFile_ThrowsException_WhenDeleteOnModelThrowsException() public method

testApiReq_ThrowsException_WhenModelReadThrowsException() public method

testApiReq_UsesEvalToIncludePhpFilesFromExternalSources() public method

testApiSetPrivate_SetsPrivate_WhenSettingIsPossible() public method

testApiSetPrivate_ThrowsException_WhenModelThrows() public method

testApiSetPrivate_ThrowsException_WhenSettingIsNotPossible() public method

testApiSetPublic_SetsPublic_WhenSettingIsPossible() public method

testApiSetPublic_ThrowsException_WhenModelThrows() public method

testApiSetPublic_ThrowsException_WhenSettingIsNotPossible() public method

testApiSetVisibility_SetsVisibility_WhenSettingIsPossible() public method

testApiSetVisibility_ThrowsException_WhenModelThrows() public method

testApiSetVisibility_ThrowsException_WhenSettingIsNotPossible() public method

testApiWrite_CallsPutOnModel_WithConfig() public method

testApiWrite_ThrowsException_WhenModelPutThrowsException() public method