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

Public Member Functions

 canInstantiateWithStreamIdentifier ()
 
 canInstantiteWithStreamResource ()
 
 isReadableReturnsFalseIfStreamIsNotReadable ()
 
 isWritableReturnsFalseIfStreamIsNotWritable ()
 
 toStringRetrievesFullContentsOfStream ()
 
 detachReturnsResource ()
 
 constructorRaisesExceptionWhenPassingInvalidStreamResource ()
 
 toStringSerializationReturnsEmptyStringWhenStreamIsNotReadable ()
 
 closeClosesResource ()
 
 closeUnsetsResource ()
 
 closeDoesNothingAfterDetach ()
 
 getSizeReportsNullWhenNoResourcePresent ()
 
 tellReportsCurrentPositionInResource ()
 
 tellRaisesExceptionIfResourceIsDetached ()
 
 eofReportsFalseWhenNotAtEndOfStream ()
 
 eofReportsTrueWhenAtEndOfStream ()
 
 eofReportsTrueWhenStreamIsDetached ()
 
 isSeekableReturnsTrueForReadableStreams ()
 
 isSeekableReturnsFalseForDetachedStreams ()
 
 seekAdvancesToGivenOffsetOfStream ()
 
 rewindResetsToStartOfStream ()
 
 seekRaisesExceptionWhenStreamIsDetached ()
 
 isWritableReturnsFalseWhenStreamIsDetached ()
 
 writeRaisesExceptionWhenStreamIsDetached ()
 
 isReadableReturnsFalseWhenStreamIsDetached ()
 
 readRaisesExceptionWhenStreamIsDetached ()
 
 readReturnsEmptyStringWhenAtEndOfFile ()
 
 getContentsReturnsEmptyStringIfStreamIsNotReadable ()
 
 invalidResourcesDataProvider ()
 
 attachWithNonStringNonResourceRaisesExceptionByType ($resource)
 
 attachWithNonStringNonResourceRaisesExceptionByString ()
 
 attachWithResourceAttachesResource ()
 
 attachWithStringRepresentingResourceCreatesAndAttachesResource ()
 
 getContentsShouldGetFullStreamContents ()
 
 getContentsShouldReturnStreamContentsFromCurrentPointer ()
 
 getMetadataReturnsAllMetadataWhenNoKeyPresent ()
 
 getMetadataReturnsDataForSpecifiedKey ()
 
 getMetadataReturnsNullIfNoDataExistsForKey ()
 
 getSizeReturnsStreamSize ()
 

Protected Member Functions

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

 $stream
 
- 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 24 of file StreamTest.php.

Member Function Documentation

attachWithNonStringNonResourceRaisesExceptionByString ( )
Test:

Definition at line 449 of file StreamTest.php.

attachWithNonStringNonResourceRaisesExceptionByType (   $resource)

invalidResourcesDataProvider

Test:

Definition at line 439 of file StreamTest.php.

attachWithResourceAttachesResource ( )
Test:

Definition at line 459 of file StreamTest.php.

References BaseTestCase\getUniqueId().

attachWithStringRepresentingResourceCreatesAndAttachesResource ( )
Test:

Definition at line 476 of file StreamTest.php.

References BaseTestCase\getUniqueId().

canInstantiateWithStreamIdentifier ( )
Test:

Definition at line 39 of file StreamTest.php.

canInstantiteWithStreamResource ( )
Test:

Definition at line 47 of file StreamTest.php.

References StreamTest\$stream.

closeClosesResource ( )
Test:

Definition at line 121 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

closeDoesNothingAfterDetach ( )
Test:

Definition at line 150 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

closeUnsetsResource ( )
Test:

Definition at line 135 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

constructorRaisesExceptionWhenPassingInvalidStreamResource ( )
Test:

Definition at line 98 of file StreamTest.php.

detachReturnsResource ( )
Test:

Definition at line 88 of file StreamTest.php.

References StreamTest\$stream.

eofReportsFalseWhenNotAtEndOfStream ( )
Test:

Definition at line 210 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

eofReportsTrueWhenAtEndOfStream ( )
Test:

Definition at line 225 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

eofReportsTrueWhenStreamIsDetached ( )
Test:

Definition at line 242 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

getContentsReturnsEmptyStringIfStreamIsNotReadable ( )
Test:

Definition at line 406 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

getContentsShouldGetFullStreamContents ( )
Test:

Definition at line 494 of file StreamTest.php.

References BaseTestCase\getUniqueId().

getContentsShouldReturnStreamContentsFromCurrentPointer ( )
Test:

Definition at line 513 of file StreamTest.php.

References BaseTestCase\getUniqueId().

getMetadataReturnsAllMetadataWhenNoKeyPresent ( )
Test:

Definition at line 532 of file StreamTest.php.

References BaseTestCase\getUniqueId().

getMetadataReturnsDataForSpecifiedKey ( )
Test:

Definition at line 549 of file StreamTest.php.

References BaseTestCase\getUniqueId().

getMetadataReturnsNullIfNoDataExistsForKey ( )
Test:

Definition at line 568 of file StreamTest.php.

References BaseTestCase\getUniqueId().

getSizeReportsNullWhenNoResourcePresent ( )
Test:

Definition at line 167 of file StreamTest.php.

getSizeReturnsStreamSize ( )
Test:

Definition at line 582 of file StreamTest.php.

References StreamTest\$stream.

invalidResourcesDataProvider ( )
Returns
array

Definition at line 419 of file StreamTest.php.

isReadableReturnsFalseIfStreamIsNotReadable ( )
Test:

Definition at line 57 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

isReadableReturnsFalseWhenStreamIsDetached ( )
Test:

Definition at line 360 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

isSeekableReturnsFalseForDetachedStreams ( )
Test:

Definition at line 271 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

isSeekableReturnsTrueForReadableStreams ( )
Test:

Definition at line 258 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

isWritableReturnsFalseIfStreamIsNotWritable ( )
Test:

Definition at line 69 of file StreamTest.php.

References StreamTest\$stream.

isWritableReturnsFalseWhenStreamIsDetached ( )
Test:

Definition at line 330 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

readRaisesExceptionWhenStreamIsDetached ( )
Test:

Definition at line 374 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

readReturnsEmptyStringWhenAtEndOfFile ( )
Test:

Definition at line 390 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

rewindResetsToStartOfStream ( )
Test:

Definition at line 299 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

seekAdvancesToGivenOffsetOfStream ( )
Test:

Definition at line 285 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

seekRaisesExceptionWhenStreamIsDetached ( )
Test:

Definition at line 314 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

setUp ( )
protected

Definition at line 31 of file StreamTest.php.

tellRaisesExceptionIfResourceIsDetached ( )
Test:

Definition at line 192 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

tellReportsCurrentPositionInResource ( )
Test:

Definition at line 176 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

toStringRetrievesFullContentsOfStream ( )
Test:

Definition at line 78 of file StreamTest.php.

toStringSerializationReturnsEmptyStringWhenStreamIsNotReadable ( )
Test:

Definition at line 107 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

writeRaisesExceptionWhenStreamIsDetached ( )
Test:

Definition at line 344 of file StreamTest.php.

References StreamTest\$stream, and BaseTestCase\getUniqueId().

Member Data Documentation