PHP Class Neos\Flow\Tests\Unit\Http\RequestTest

In some tests backupGlobals is disabled, this is to avoid risky test warnings caused by changed globals that are needed to be changed in those tests. Additionally those tests backup/restore the $_SERVER superglobal to avoid a warning with PHPUnit when it tries to access that in phpunit/phpunit/src/Util/Filter.php on line 29
Inheritance: extends Neos\Flow\Tests\UnitTestCase
Afficher le fichier Open project: neos/flow-development-collection

Méthodes publiques

Méthode Description
acceptHeaderValuesAndCorrespondingListOfMediaTypes ( ) Data Provider
constructRecognizesSslSessionIdAsIndicatorForSsl ( )
constructorCorrectlyStripsOffIndexPhpFromRequestUri ( string $host, string $requestUri, string $expectedUri )
constructorCorrectlyStripsOffIndexPhpFromRequestUriDataProvider ( ) : array
constructorIgnoresHttpsHeader ( )
createActionRequestCreatesAnMvcRequestConnectedToTheParentRequest ( )
createFromEnvironmentCreatesAReasonableRequestObjectFromTheSuperGlobals ( )
createFromEnvironmentWithEmptyServerVariableWorks ( )
createSetsTheContentTypeHeaderToFormUrlEncodedByDefaultIfRequestMethodSuggestsIt ( ) HTML 2.0 and up (see also HTML5, section 4.10.22.5 "URL-encoded form data")
createUsesReasonableDefaultsForCreatingANewRequest ( )
getAcceptedMediaTypesReturnsAnOrderedListOfMediaTypesDefinedInTheAcceptHeader ( $rawValues, $expectedMediaTypes ) RFC 2616 / 14.1 (Accept)
getArgumentsReturnsGetAndPostArguments ( $method, $uriString, $postArguments, $filesArguments, $expectedArguments )
getBaseUriReturnsTheDetectedBaseUri ( )
getBaseUriReturnsThePresetBaseUriIfItHasBeenSet ( )
getContentReturnsTheRequestBodyContent ( )
getContentReturnsTheRequestBodyContentAsResourcePointerIfRequested ( )
getContentThrowsAnExceptionOnTryingToRetrieveContentAsResourceAlthoughItHasBeenRetrievedPreviously ( )
getNegotiatedMediaTypeReturnsMediaTypeBasedOnContentNegotiation ( string $preferredTypes, array $supportedTypes, string $negotiatedType ) RFC 2616 / 14.1 (Accept)
getRelativePathCorrectlyTrimsBaseUri ( )
getRelativePathReturnsEmptyStringForHomepage ( )
getReturnsTheRequestUri ( ) RFC 2616 / 5.1.2
httpHostIsNotAppendedByColonIfNoExplicitPortIsGiven ( )
isMethodSafeReturnsTrueIfTheRequestMethodIsGetOrHead ( ) RFC 2616 / 9.1.1
methodCanBeOverridden ( string $originalMethod, array $arguments, array $server, string $expectedMethod )
methodCanBeOverriddenDataProvider ( ) : array
nonStandardHttpsPortIsAddedToHttpHost ( ) RFC 2616 / 14.23 (Host)
nonStandardHttpsPortIsAddedToServerPort ( ) RFC 2616 / 14.23 (Host)
nonStandardPortIsAddedToServerPort ( ) RFC 2616 / 14.23 (Host)
nonStandardPortIsRecognizedCorrectly ( ) RFC 2616 / 14.23 (Host)
parseContentNegotiationQualityValuesReturnsNormalizedAndOrderListOfPreferredValues ( string $rawValues, array $expectedValues )
preferedSupportedAndNegotiatedMediaTypes ( ) Data Provider
qualityValues ( ) : array Data provider with valid quality value strings and the expected parse output
renderHeadersReturnsRawHttpHeadersAccordingToTheRequestProperties ( )
requestMethods ( ) : array
setContentAlsoAcceptsAFileHandleAsInput ( )
setContentAlsoAcceptsAStreamAsInputAndSetsContentLengthAndTypeAccordingly ( )
setMethodAcceptsAnyRequestMethod ( $validMethod )
settingVersionHasExpectedImplications ( )
singleArgumentsCanBeCheckedAndRetrieved ( )
standardHttpsPortIsRecognizedCorrectly ( ) RFC 2616 / 14.23 (Host)
standardPortsAreRecognizedCorrectly ( ) RFC 2616 / 14.23 (Host)
toStringReturnsRawHttpRequestAccordingToTheRequestProperties ( )
untangleFilesArrayDoesNotChangeArgumentsIfNoFileWasUploaded ( )
untangleFilesArrayTransformsTheFilesSuperglobalIntoAMangeableForm ( )
variousArguments ( ) Data Provider

Method Details

acceptHeaderValuesAndCorrespondingListOfMediaTypes() public méthode

Data Provider

constructRecognizesSslSessionIdAsIndicatorForSsl() public méthode

constructorCorrectlyStripsOffIndexPhpFromRequestUri() public méthode

public constructorCorrectlyStripsOffIndexPhpFromRequestUri ( string $host, string $requestUri, string $expectedUri )
$host string
$requestUri string
$expectedUri string

constructorCorrectlyStripsOffIndexPhpFromRequestUriDataProvider() public méthode

constructorIgnoresHttpsHeader() public méthode

createActionRequestCreatesAnMvcRequestConnectedToTheParentRequest() public méthode

createFromEnvironmentCreatesAReasonableRequestObjectFromTheSuperGlobals() public méthode

createFromEnvironmentWithEmptyServerVariableWorks() public méthode

createSetsTheContentTypeHeaderToFormUrlEncodedByDefaultIfRequestMethodSuggestsIt() public méthode

HTML 2.0 and up (see also HTML5, section 4.10.22.5 "URL-encoded form data")

createUsesReasonableDefaultsForCreatingANewRequest() public méthode

getAcceptedMediaTypesReturnsAnOrderedListOfMediaTypesDefinedInTheAcceptHeader() public méthode

RFC 2616 / 14.1 (Accept)

getArgumentsReturnsGetAndPostArguments() public méthode

public getArgumentsReturnsGetAndPostArguments ( $method, $uriString, $postArguments, $filesArguments, $expectedArguments )

getBaseUriReturnsTheDetectedBaseUri() public méthode

getBaseUriReturnsThePresetBaseUriIfItHasBeenSet() public méthode

getContentReturnsTheRequestBodyContent() public méthode

getContentReturnsTheRequestBodyContentAsResourcePointerIfRequested() public méthode

getContentThrowsAnExceptionOnTryingToRetrieveContentAsResourceAlthoughItHasBeenRetrievedPreviously() public méthode

getNegotiatedMediaTypeReturnsMediaTypeBasedOnContentNegotiation() public méthode

RFC 2616 / 14.1 (Accept)
public getNegotiatedMediaTypeReturnsMediaTypeBasedOnContentNegotiation ( string $preferredTypes, array $supportedTypes, string $negotiatedType )
$preferredTypes string
$supportedTypes array
$negotiatedType string

getRelativePathCorrectlyTrimsBaseUri() public méthode

getRelativePathReturnsEmptyStringForHomepage() public méthode

getReturnsTheRequestUri() public méthode

RFC 2616 / 5.1.2

httpHostIsNotAppendedByColonIfNoExplicitPortIsGiven() public méthode

isMethodSafeReturnsTrueIfTheRequestMethodIsGetOrHead() public méthode

RFC 2616 / 9.1.1

methodCanBeOverridden() public méthode

public methodCanBeOverridden ( string $originalMethod, array $arguments, array $server, string $expectedMethod )
$originalMethod string
$arguments array
$server array
$expectedMethod string

methodCanBeOverriddenDataProvider() public méthode

nonStandardHttpsPortIsAddedToHttpHost() public méthode

RFC 2616 / 14.23 (Host)

nonStandardHttpsPortIsAddedToServerPort() public méthode

RFC 2616 / 14.23 (Host)

nonStandardPortIsAddedToServerPort() public méthode

RFC 2616 / 14.23 (Host)

nonStandardPortIsRecognizedCorrectly() public méthode

RFC 2616 / 14.23 (Host)

parseContentNegotiationQualityValuesReturnsNormalizedAndOrderListOfPreferredValues() public méthode

public parseContentNegotiationQualityValuesReturnsNormalizedAndOrderListOfPreferredValues ( string $rawValues, array $expectedValues )
$rawValues string The unparsed header field
$expectedValues array The expected parse result

preferedSupportedAndNegotiatedMediaTypes() public méthode

Data Provider

qualityValues() public méthode

Data provider with valid quality value strings and the expected parse output
public qualityValues ( ) : array
Résultat array

renderHeadersReturnsRawHttpHeadersAccordingToTheRequestProperties() public méthode

requestMethods() public méthode

public requestMethods ( ) : array
Résultat array

setContentAlsoAcceptsAFileHandleAsInput() public méthode

setContentAlsoAcceptsAStreamAsInputAndSetsContentLengthAndTypeAccordingly() public méthode

setMethodAcceptsAnyRequestMethod() public méthode

public setMethodAcceptsAnyRequestMethod ( $validMethod )

settingVersionHasExpectedImplications() public méthode

singleArgumentsCanBeCheckedAndRetrieved() public méthode

standardHttpsPortIsRecognizedCorrectly() public méthode

RFC 2616 / 14.23 (Host)

standardPortsAreRecognizedCorrectly() public méthode

RFC 2616 / 14.23 (Host)

toStringReturnsRawHttpRequestAccordingToTheRequestProperties() public méthode

untangleFilesArrayDoesNotChangeArgumentsIfNoFileWasUploaded() public méthode

untangleFilesArrayTransformsTheFilesSuperglobalIntoAMangeableForm() public méthode

variousArguments() public méthode

Data Provider
public variousArguments ( )