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

Public Member Functions

 getMethodIsGetByDefault ()
 
 getMethodMutatorReturnsCloneWithChangedMethod ()
 
 getUriIsNullByDefault ()
 
 constructorRaisesExceptionForInvalidStream ()
 
 withUriReturnsNewInstanceWithNewUri ()
 
 constructorCanAcceptAllMessageParts ()
 
 invalidRequestUriDataProvider ()
 
 constructorRaisesExceptionForInvalidUri ($uri)
 
 invalidRequestMethodDataProvider ()
 
 constructorRaisesExceptionForInvalidMethodByType ($method)
 
 constructorRaisesExceptionForInvalidMethodByString ()
 
 invalidRequestBodyDataProvider ()
 
 constructorRaisesExceptionForInvalidBody ($body)
 
 constructorIgnoresInvalidHeaders ()
 
 getRequestTargetIsSlashWhenNoUriPresent ()
 
 getRequestTargetIsSlashWhenUriHasNoPathOrQuery ()
 
 requestsWithUriDataProvider ()
 
 getRequestTargetWhenUriIsPresent ($request, $expected)
 
 validRequestTargetsDataProvider ()
 
 getRequestTargetCanProvideARequestTarget ($requestTarget)
 
 withRequestTargetCannotContainWhitespace ()
 
 getRequestTargetDoesNotCacheBetweenInstances ()
 
 getRequestTargetIsResetWithNewUri ()
 
 getHeadersContainsHostHeaderIfUriWithHostIsPresent ()
 
 getHeadersContainsNoHostHeaderIfNoUriPresent ()
 
 getHeadersContainsNoHostHeaderIfUriDoesNotContainHost ()
 
 getHeaderWithHostReturnsUriHostWhenPresent ()
 
 getHeaderWithHostReturnsEmptyArrayIfNoUriPresent ()
 
 getHeaderWithHostReturnsEmptyArrayIfUriDoesNotContainHost ()
 
 getHeaderLineWithHostReturnsUriHostWhenPresent ()
 
 getHeaderLineWithHostReturnsEmptyStringIfNoUriPresent ()
 
 getHeaderLineWithHostReturnsEmptyStringIfUriDoesNotContainHost ()
 
 getHeaderLineWithHostTakesPrecedenceOverModifiedUri ()
 
 getHeaderLineWithHostTakesPrecedenceOverEmptyUri ()
 
 getHeaderLineWithHostDoesNotTakePrecedenceOverHostWithPortFromUri ()
 
 headersWithUpperAndLowerCaseValuesDataProvider ()
 
 headerCanBeRetrieved ($header, $value, $expected)
 
 headersWithInjectionVectorsDataProvider ()
 
 constructorRaisesExceptionForHeadersWithCRLFVectors ($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

 $request
 
- 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 core/Tests/Unit/Http/RequestTest.php.

Member Function Documentation

constructorCanAcceptAllMessageParts ( )
Test:

Definition at line 89 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

constructorIgnoresInvalidHeaders ( )
Test:

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

References RequestTest\$request.

constructorRaisesExceptionForHeadersWithCRLFVectors (   $name,
  $value 
)
Test:
headersWithInjectionVectorsDataProvider

Definition at line 523 of file core/Tests/Unit/Http/RequestTest.php.

constructorRaisesExceptionForInvalidBody (   $body)

invalidRequestBodyDataProvider

Test:

Definition at line 194 of file core/Tests/Unit/Http/RequestTest.php.

constructorRaisesExceptionForInvalidMethodByString ( )
Test:

Definition at line 168 of file core/Tests/Unit/Http/RequestTest.php.

constructorRaisesExceptionForInvalidMethodByType (   $method)

invalidRequestMethodDataProvider

Test:

Definition at line 158 of file core/Tests/Unit/Http/RequestTest.php.

constructorRaisesExceptionForInvalidStream ( )
Test:

Definition at line 67 of file core/Tests/Unit/Http/RequestTest.php.

constructorRaisesExceptionForInvalidUri (   $uri)

invalidRequestUriDataProvider

Test:

Definition at line 132 of file core/Tests/Unit/Http/RequestTest.php.

getHeaderLineWithHostDoesNotTakePrecedenceOverHostWithPortFromUri ( )
Test:

Definition at line 460 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderLineWithHostReturnsEmptyStringIfNoUriPresent ( )
Test:

Definition at line 414 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderLineWithHostReturnsEmptyStringIfUriDoesNotContainHost ( )
Test:

Definition at line 423 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderLineWithHostReturnsUriHostWhenPresent ( )
Test:

Definition at line 404 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderLineWithHostTakesPrecedenceOverEmptyUri ( )
Test:

Definition at line 446 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderLineWithHostTakesPrecedenceOverModifiedUri ( )
Test:

Definition at line 432 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeadersContainsHostHeaderIfUriWithHostIsPresent ( )
Test:

Definition at line 345 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeadersContainsNoHostHeaderIfNoUriPresent ( )
Test:

Definition at line 356 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeadersContainsNoHostHeaderIfUriDoesNotContainHost ( )
Test:

Definition at line 366 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderWithHostReturnsEmptyArrayIfNoUriPresent ( )
Test:

Definition at line 386 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderWithHostReturnsEmptyArrayIfUriDoesNotContainHost ( )
Test:

Definition at line 395 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getHeaderWithHostReturnsUriHostWhenPresent ( )
Test:

Definition at line 376 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getMethodIsGetByDefault ( )
Test:

Definition at line 41 of file core/Tests/Unit/Http/RequestTest.php.

getMethodMutatorReturnsCloneWithChangedMethod ( )
Test:

Definition at line 49 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetCanProvideARequestTarget (   $requestTarget)

validRequestTargetsDataProvider

Test:

Definition at line 304 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetDoesNotCacheBetweenInstances ( )
Test:

Definition at line 324 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetIsResetWithNewUri ( )
Test:

Definition at line 335 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetIsSlashWhenNoUriPresent ( )
Test:

Definition at line 227 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetIsSlashWhenUriHasNoPathOrQuery ( )
Test:

Definition at line 236 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getRequestTargetWhenUriIsPresent (   $request,
  $expected 
)

requestsWithUriDataProvider

Test:

Definition at line 280 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

getUriIsNullByDefault ( )
Test:

Definition at line 59 of file core/Tests/Unit/Http/RequestTest.php.

headerCanBeRetrieved (   $header,
  $value,
  $expected 
)
Test:
headersWithUpperAndLowerCaseValuesDataProvider

Definition at line 491 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

headersWithInjectionVectorsDataProvider ( )
Returns
array

Definition at line 501 of file core/Tests/Unit/Http/RequestTest.php.

headersWithUpperAndLowerCaseValuesDataProvider ( )
Returns
array

Definition at line 476 of file core/Tests/Unit/Http/RequestTest.php.

invalidRequestBodyDataProvider ( )
Returns
array

Definition at line 178 of file core/Tests/Unit/Http/RequestTest.php.

invalidRequestMethodDataProvider ( )
Returns
array

Definition at line 142 of file core/Tests/Unit/Http/RequestTest.php.

invalidRequestUriDataProvider ( )
Returns
array

Definition at line 116 of file core/Tests/Unit/Http/RequestTest.php.

requestsWithUriDataProvider ( )
Returns
array

Definition at line 246 of file core/Tests/Unit/Http/RequestTest.php.

setUp ( )
protected

Definition at line 33 of file core/Tests/Unit/Http/RequestTest.php.

validRequestTargetsDataProvider ( )
Returns
array

Definition at line 288 of file core/Tests/Unit/Http/RequestTest.php.

withRequestTargetCannotContainWhitespace ( )
Test:

Definition at line 313 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

withUriReturnsNewInstanceWithNewUri ( )
Test:

Definition at line 76 of file core/Tests/Unit/Http/RequestTest.php.

References RequestTest\$request.

Member Data Documentation

$request
protected

Definition at line 31 of file core/Tests/Unit/Http/RequestTest.php.

Referenced by RequestTest\constructorCanAcceptAllMessageParts(), RequestTest\constructorIgnoresInvalidHeaders(), RequestTest\getHeaderLineWithHostDoesNotTakePrecedenceOverHostWithPortFromUri(), RequestTest\getHeaderLineWithHostReturnsEmptyStringIfNoUriPresent(), RequestTest\getHeaderLineWithHostReturnsEmptyStringIfUriDoesNotContainHost(), RequestTest\getHeaderLineWithHostReturnsUriHostWhenPresent(), RequestTest\getHeaderLineWithHostTakesPrecedenceOverEmptyUri(), RequestTest\getHeaderLineWithHostTakesPrecedenceOverModifiedUri(), RequestTest\getHeadersContainsHostHeaderIfUriWithHostIsPresent(), RequestTest\getHeadersContainsNoHostHeaderIfNoUriPresent(), RequestTest\getHeadersContainsNoHostHeaderIfUriDoesNotContainHost(), RequestTest\getHeaderWithHostReturnsEmptyArrayIfNoUriPresent(), RequestTest\getHeaderWithHostReturnsEmptyArrayIfUriDoesNotContainHost(), RequestTest\getHeaderWithHostReturnsUriHostWhenPresent(), RequestTest\getMethodMutatorReturnsCloneWithChangedMethod(), RequestTest\getRequestTargetCanProvideARequestTarget(), RequestTest\getRequestTargetDoesNotCacheBetweenInstances(), RequestTest\getRequestTargetIsResetWithNewUri(), RequestTest\getRequestTargetIsSlashWhenNoUriPresent(), RequestTest\getRequestTargetIsSlashWhenUriHasNoPathOrQuery(), RequestTest\getRequestTargetWhenUriIsPresent(), RequestTest\headerCanBeRetrieved(), RequestTest\withRequestTargetCannotContainWhitespace(), and RequestTest\withUriReturnsNewInstanceWithNewUri().