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

Public Member Functions

 protocolHasAcceptableDefault ()
 
 protocolMutatorReturnsCloneWithChanges ()
 
 usesStreamProvidedInConstructorAsBody ()
 
 bodyMutatorReturnsCloneWithChanges ()
 
 getHeaderReturnsHeaderValueAsArray ()
 
 getHeaderLineReturnsHeaderValueAsCommaConcatenatedString ()
 
 getHeadersKeepsHeaderCaseSensitivity ()
 
 getHeadersReturnsCaseWithWhichHeaderFirstRegistered ()
 
 hasHeaderReturnsFalseIfHeaderIsNotPresent ()
 
 hasHeaderReturnsTrueIfHeaderIsPresent ()
 
 addHeaderAppendsToExistingHeader ()
 
 canRemoveHeaders ()
 
 headerRemovalIsCaseInsensitive ()
 
 invalidGeneralHeaderValuesDataProvider ()
 
 testWithHeaderRaisesExceptionForInvalidNestedHeaderValue ($value)
 
 invalidHeaderValuesDataProvider ()
 
 withHeaderRaisesExceptionForInvalidValueType ($value)
 
 withAddedHeaderRaisesExceptionForNonStringNonArrayValue ($value)
 
 withoutHeaderDoesNothingIfHeaderDoesNotExist ()
 
 getHeaderReturnsAnEmptyArrayWhenHeaderDoesNotExist ()
 
 getHeaderLineReturnsEmptyStringWhenHeaderDoesNotExist ()
 
 headersWithInjectionVectorsDataProvider ()
 
 doesNotAllowCRLFInjectionWhenCallingWithHeader ($name, $value)
 
 doesNotAllowCRLFInjectionWhenCallingWithAddedHeader ($name, $value)
 

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
 
 $message
 
- 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 25 of file core/Tests/Unit/Http/MessageTest.php.

Member Function Documentation

addHeaderAppendsToExistingHeader ( )
Test:

Definition at line 143 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

bodyMutatorReturnsCloneWithChanges ( )
canRemoveHeaders ( )
Test:

Definition at line 155 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

doesNotAllowCRLFInjectionWhenCallingWithAddedHeader (   $name,
  $value 
)

headersWithInjectionVectorsDataProvider

Test:

Definition at line 310 of file core/Tests/Unit/Http/MessageTest.php.

doesNotAllowCRLFInjectionWhenCallingWithHeader (   $name,
  $value 
)

headersWithInjectionVectorsDataProvider

Test:

Definition at line 300 of file core/Tests/Unit/Http/MessageTest.php.

getHeaderLineReturnsEmptyStringWhenHeaderDoesNotExist ( )
Test:

Definition at line 268 of file core/Tests/Unit/Http/MessageTest.php.

getHeaderLineReturnsHeaderValueAsCommaConcatenatedString ( )
Test:

Definition at line 93 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

getHeaderReturnsAnEmptyArrayWhenHeaderDoesNotExist ( )
Test:

Definition at line 260 of file core/Tests/Unit/Http/MessageTest.php.

getHeaderReturnsHeaderValueAsArray ( )
Test:

Definition at line 83 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

getHeadersKeepsHeaderCaseSensitivity ( )
Test:

Definition at line 103 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

getHeadersReturnsCaseWithWhichHeaderFirstRegistered ( )
Test:

Definition at line 113 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

hasHeaderReturnsFalseIfHeaderIsNotPresent ( )
Test:

Definition at line 125 of file core/Tests/Unit/Http/MessageTest.php.

hasHeaderReturnsTrueIfHeaderIsPresent ( )
Test:

Definition at line 133 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

headerRemovalIsCaseInsensitive ( )
Test:

Definition at line 169 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

headersWithInjectionVectorsDataProvider ( )
Returns
array

Definition at line 276 of file core/Tests/Unit/Http/MessageTest.php.

invalidGeneralHeaderValuesDataProvider ( )
Returns
array

Definition at line 188 of file core/Tests/Unit/Http/MessageTest.php.

invalidHeaderValuesDataProvider ( )
Returns
array

Definition at line 214 of file core/Tests/Unit/Http/MessageTest.php.

protocolHasAcceptableDefault ( )
Test:

Definition at line 46 of file core/Tests/Unit/Http/MessageTest.php.

protocolMutatorReturnsCloneWithChanges ( )
Test:

Definition at line 54 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

setUp ( )
protected

Definition at line 37 of file core/Tests/Unit/Http/MessageTest.php.

testWithHeaderRaisesExceptionForInvalidNestedHeaderValue (   $value)

invalidGeneralHeaderValuesDataProvider

Definition at line 204 of file core/Tests/Unit/Http/MessageTest.php.

usesStreamProvidedInConstructorAsBody ( )
Test:

Definition at line 64 of file core/Tests/Unit/Http/MessageTest.php.

withAddedHeaderRaisesExceptionForNonStringNonArrayValue (   $value)

invalidHeaderValuesDataProvider

Definition at line 239 of file core/Tests/Unit/Http/MessageTest.php.

withHeaderRaisesExceptionForInvalidValueType (   $value)

invalidHeaderValuesDataProvider

Definition at line 229 of file core/Tests/Unit/Http/MessageTest.php.

withoutHeaderDoesNothingIfHeaderDoesNotExist ( )
Test:

Definition at line 249 of file core/Tests/Unit/Http/MessageTest.php.

References MessageTest\$message.

Member Data Documentation

$stream
protected