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

Public Member Functions

 invalidStreamsDataProvider ()
 
 constructorRaisesExceptionOnInvalidStreamOrFile ($streamOrFile)
 
 invalidSizesDataProvider ()
 
 constructorRaisesExceptionOnInvalidSize ($size)
 
 invalidErrorStatusesDataProvider ()
 
 constructorRaisesExceptionOnInvalidErrorStatus ($status)
 
 invalidFilenamesAndMediaTypesDataProvider ()
 
 constructorRaisesExceptionOnInvalidClientFilename ($filename)
 
 constructorRaisesExceptionOnInvalidClientMediaType ($mediaType)
 
 getStreamReturnsOriginalStreamObject ()
 
 getStreamReturnsWrappedPhpStream ()
 
 getStreamReturnsStreamForFile ()
 
 moveToMovesFileToDesignatedPath ()
 
 invalidMovePathsDataProvider ()
 
 moveToRaisesExceptionForInvalidPath ($path)
 
 moveToCannotBeCalledMoreThanOnce ()
 
 getGetStreamRaisesExceptionAfterMove ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
- 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

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

Detailed Description

Testcase for

Adapted from https://github.com/phly/http/

Definition at line 26 of file UploadedFileTest.php.

Member Function Documentation

constructorRaisesExceptionOnInvalidClientFilename (   $filename)

invalidFilenamesAndMediaTypesDataProvider

Test:

Definition at line 147 of file UploadedFileTest.php.

constructorRaisesExceptionOnInvalidClientMediaType (   $mediaType)

invalidFilenamesAndMediaTypesDataProvider

Test:

Definition at line 158 of file UploadedFileTest.php.

constructorRaisesExceptionOnInvalidErrorStatus (   $status)

invalidErrorStatusesDataProvider

Test:

Definition at line 121 of file UploadedFileTest.php.

constructorRaisesExceptionOnInvalidSize (   $size)

invalidSizesDataProvider

Test:

Definition at line 92 of file UploadedFileTest.php.

constructorRaisesExceptionOnInvalidStreamOrFile (   $streamOrFile)

invalidStreamsDataProvider

Test:

Definition at line 66 of file UploadedFileTest.php.

getGetStreamRaisesExceptionAfterMove ( )
Test:

Definition at line 269 of file UploadedFileTest.php.

References GeneralUtility\tempnam().

getStreamReturnsOriginalStreamObject ( )
Test:

Definition at line 168 of file UploadedFileTest.php.

getStreamReturnsStreamForFile ( )
Test:

Definition at line 189 of file UploadedFileTest.php.

getStreamReturnsWrappedPhpStream ( )
Test:

Definition at line 178 of file UploadedFileTest.php.

invalidErrorStatusesDataProvider ( )
Returns
array

Definition at line 102 of file UploadedFileTest.php.

invalidFilenamesAndMediaTypesDataProvider ( )
Returns
array

Definition at line 131 of file UploadedFileTest.php.

invalidMovePathsDataProvider ( )
Returns
array

Definition at line 218 of file UploadedFileTest.php.

invalidSizesDataProvider ( )
Returns
array

Definition at line 75 of file UploadedFileTest.php.

invalidStreamsDataProvider ( )
Returns
array

Definition at line 45 of file UploadedFileTest.php.

moveToCannotBeCalledMoreThanOnce ( )
Test:

Definition at line 251 of file UploadedFileTest.php.

References GeneralUtility\tempnam().

moveToMovesFileToDesignatedPath ( )
Test:

Definition at line 202 of file UploadedFileTest.php.

References GeneralUtility\tempnam().

moveToRaisesExceptionForInvalidPath (   $path)

invalidMovePathsDataProvider

Test:

Definition at line 236 of file UploadedFileTest.php.

setUp ( )
protected

Definition at line 30 of file UploadedFileTest.php.

tearDown ( )
protected

Definition at line 35 of file UploadedFileTest.php.

Member Data Documentation

$tmpFile
protected

Definition at line 28 of file UploadedFileTest.php.