Documentation

RequestTest extends TestCase
in package

Table of Contents

getBaseUrlData()  : mixed
getClientIpsForwardedProvider()  : mixed
getClientIpsProvider()  : mixed
getClientIpsWithAgreeingHeadersProvider()  : mixed
getClientIpsWithConflictingHeadersProvider()  : mixed
getContentCanBeCalledTwiceWithResourcesProvider()  : mixed
getContentCantBeCalledTwiceWithResourcesProvider()  : mixed
getFormatToMimeTypeMapProvider()  : mixed
getFormatToMimeTypeMapProviderWithAdditionalNullFormat()  : mixed
getHostValidities()  : mixed
getLongHostNames()  : mixed
getQueryStringNormalizationData()  : mixed
getRelativeUriForPathData()  : mixed
getRequestUriData()  : mixed
iisRequestUriProvider()  : mixed
methodCacheableProvider()  : mixed
methodIdempotentProvider()  : mixed
methodSafeProvider()  : mixed
nonstandardRequestsData()  : mixed
protocolVersionProvider()  : mixed
provideOverloadedMethods()  : mixed
testContentAsResource()  : mixed
testCreate()  : mixed
testCreateCheckPrecedence()  : mixed
testCreateFromGlobals()  : mixed
testCreateWithRequestUri()  : mixed
testDuplicate()  : mixed
testDuplicateWithFormat()  : mixed
testFactory()  : mixed
testGetAcceptableContentTypes()  : mixed
testGetBasePath()  : mixed
testGetBaseUrl()  : mixed
testGetCharsets()  : mixed
testGetClientIp()  : mixed
testGetClientIps()  : mixed
testGetClientIpsForwarded()  : mixed
testGetClientIpsOnlyXHttpForwardedForTrusted()  : mixed
testGetClientIpsWithAgreeingHeaders()  : mixed
testGetClientIpsWithConflictingHeaders()  : mixed
testGetContentCanBeCalledTwiceWithResources()  : mixed
testGetContentCantBeCalledTwiceWithResources()  : mixed
testGetContentReturnsResource()  : mixed
testGetContentReturnsResourceWhenContentSetInConstructor()  : mixed
testGetContentType()  : mixed
testGetContentWorksTwiceInDefaultMode()  : mixed
testGetEncodings()  : mixed
testGetFormatFromMimeType()  : mixed
testGetFormatFromMimeTypeWithParameters()  : mixed
testGetFormatWithCustomMimeType()  : mixed
testGetHost()  : mixed
testGetHostWithFakeHttpHostValue()  : mixed
testGetLanguages()  : mixed
testGetLocale()  : mixed
testGetMimeTypeFromFormat()  : mixed
testGetMimeTypesFromFormat()  : mixed
testGetMimeTypesFromInexistentFormat()  : mixed
testGetParameterPrecedence()  : mixed
testGetPassword()  : mixed
testGetPathInfo()  : mixed
testGetPort()  : mixed
testGetPreferredLanguage()  : mixed
testGetQueryString()  : mixed
testGetQueryStringReturnsNull()  : mixed
testGetRelativeUriForPath()  : mixed
testGetRequestFormat()  : mixed
testGetRequestUri()  : mixed
testGetRequestUriWithoutRequiredHeader()  : mixed
testGetSchemeAndHttpHost()  : mixed
testGetScriptName()  : mixed
testGetSession()  : mixed
testGetSetMethod()  : mixed
testGetTrustedHeaderName()  : mixed
testGetTrustedProxiesInvalidHeaderName()  : mixed
testGetUri()  : mixed
testGetUriForPath()  : mixed
testGetUser()  : mixed
testGetUserInfo()  : mixed
testHasPreviousSession()  : mixed
testHasSession()  : mixed
testHostValidity()  : mixed
testIISRequestUri()  : mixed
testInitialize()  : mixed
testIntlLocale()  : mixed
testIsMethod()  : mixed
testIsNoCache()  : mixed
testIsXmlHttpRequest()  : mixed
testLegacyTrustedProxies()  : mixed
testMethodCacheable()  : mixed
testMethodIdempotent()  : mixed
testMethodSafe()  : mixed
testMethodSafeChecksCacheable()  : mixed
testNonstandardRequests()  : mixed
testOverrideGlobals()  : mixed
testProtocolVersion()  : mixed
testSetDefaultLocale()  : mixed
testSetTrustedHostsDoesNotBreakOnSpecialCharacters()  : mixed
testSetTrustedProxiesInvalidHeaderName()  : mixed
testToString()  : mixed
testTrustedHost()  : mixed
testTrustedHosts()  : mixed
testTrustedPort()  : mixed
testTrustedPortDoesNotDefaultToZero()  : mixed
testTrustedProxiesForwarded()  : mixed
testTrustedProxiesXForwardedFor()  : mixed
testUrlencodedStringPrefix()  : mixed
testVeryLongHosts()  : mixed
urlencodedStringPrefixData()  : mixed
tearDown()  : mixed
disableHttpMethodParameterOverride()  : mixed
getRequestInstanceForClientIpsForwardedTests()  : mixed
getRequestInstanceForClientIpTests()  : mixed

Methods

getBaseUrlData()

public getBaseUrlData() : mixed
Return values
mixed

getClientIpsForwardedProvider()

public getClientIpsForwardedProvider() : mixed
Return values
mixed

getClientIpsProvider()

public getClientIpsProvider() : mixed
Return values
mixed

getClientIpsWithAgreeingHeadersProvider()

public getClientIpsWithAgreeingHeadersProvider() : mixed
Return values
mixed

getClientIpsWithConflictingHeadersProvider()

public getClientIpsWithConflictingHeadersProvider() : mixed
Return values
mixed

getContentCanBeCalledTwiceWithResourcesProvider()

public getContentCanBeCalledTwiceWithResourcesProvider() : mixed
Return values
mixed

getContentCantBeCalledTwiceWithResourcesProvider()

public getContentCantBeCalledTwiceWithResourcesProvider() : mixed
Return values
mixed

getFormatToMimeTypeMapProvider()

public getFormatToMimeTypeMapProvider() : mixed
Return values
mixed

getFormatToMimeTypeMapProviderWithAdditionalNullFormat()

public getFormatToMimeTypeMapProviderWithAdditionalNullFormat() : mixed
Return values
mixed

getHostValidities()

public getHostValidities() : mixed
Return values
mixed

getLongHostNames()

public getLongHostNames() : mixed
Return values
mixed

getQueryStringNormalizationData()

public getQueryStringNormalizationData() : mixed
Return values
mixed

getRelativeUriForPathData()

public getRelativeUriForPathData() : mixed
Return values
mixed

getRequestUriData()

public getRequestUriData() : mixed
Return values
mixed

iisRequestUriProvider()

public iisRequestUriProvider() : mixed
Return values
mixed

methodCacheableProvider()

public methodCacheableProvider() : mixed
Return values
mixed

methodIdempotentProvider()

public methodIdempotentProvider() : mixed
Return values
mixed

methodSafeProvider()

public methodSafeProvider() : mixed
Return values
mixed

nonstandardRequestsData()

public nonstandardRequestsData() : mixed
Return values
mixed

protocolVersionProvider()

public protocolVersionProvider() : mixed
Return values
mixed

provideOverloadedMethods()

public provideOverloadedMethods() : mixed
Return values
mixed

testContentAsResource()

public testContentAsResource() : mixed
Return values
mixed

testCreate()

public testCreate() : mixed
Return values
mixed

testCreateCheckPrecedence()

public testCreateCheckPrecedence() : mixed
Return values
mixed

testCreateFromGlobals()

public testCreateFromGlobals(mixed $method) : mixed
Parameters
$method : mixed
Tags
dataProvider

provideOverloadedMethods

Return values
mixed

testCreateWithRequestUri()

public testCreateWithRequestUri() : mixed
Return values
mixed

testDuplicate()

public testDuplicate() : mixed
Return values
mixed

testDuplicateWithFormat()

public testDuplicateWithFormat() : mixed
Return values
mixed

testFactory()

public testFactory() : mixed
Return values
mixed

testGetAcceptableContentTypes()

public testGetAcceptableContentTypes() : mixed
Return values
mixed

testGetBasePath()

public testGetBasePath() : mixed
Return values
mixed

testGetBaseUrl()

public testGetBaseUrl(mixed $uri, mixed $server, mixed $expectedBaseUrl, mixed $expectedPathInfo) : mixed
Parameters
$uri : mixed
$server : mixed
$expectedBaseUrl : mixed
$expectedPathInfo : mixed
Tags
dataProvider

getBaseUrlData

Return values
mixed

testGetCharsets()

public testGetCharsets() : mixed
Return values
mixed

testGetClientIp()

public testGetClientIp(mixed $expected, mixed $remoteAddr, mixed $httpForwardedFor, mixed $trustedProxies) : mixed
Parameters
$expected : mixed
$remoteAddr : mixed
$httpForwardedFor : mixed
$trustedProxies : mixed
Tags
dataProvider

getClientIpsProvider

Return values
mixed

testGetClientIps()

public testGetClientIps(mixed $expected, mixed $remoteAddr, mixed $httpForwardedFor, mixed $trustedProxies) : mixed
Parameters
$expected : mixed
$remoteAddr : mixed
$httpForwardedFor : mixed
$trustedProxies : mixed
Tags
dataProvider

getClientIpsProvider

Return values
mixed

testGetClientIpsForwarded()

public testGetClientIpsForwarded(mixed $expected, mixed $remoteAddr, mixed $httpForwarded, mixed $trustedProxies) : mixed
Parameters
$expected : mixed
$remoteAddr : mixed
$httpForwarded : mixed
$trustedProxies : mixed
Tags
dataProvider

getClientIpsForwardedProvider

Return values
mixed

testGetClientIpsOnlyXHttpForwardedForTrusted()

public testGetClientIpsOnlyXHttpForwardedForTrusted(mixed $httpForwarded, mixed $httpXForwardedFor) : mixed
Parameters
$httpForwarded : mixed
$httpXForwardedFor : mixed
Tags
dataProvider

getClientIpsWithConflictingHeadersProvider

Return values
mixed

testGetClientIpsWithAgreeingHeaders()

public testGetClientIpsWithAgreeingHeaders(mixed $httpForwarded, mixed $httpXForwardedFor, mixed $expectedIps) : mixed
Parameters
$httpForwarded : mixed
$httpXForwardedFor : mixed
$expectedIps : mixed
Tags
dataProvider

getClientIpsWithAgreeingHeadersProvider

Return values
mixed

testGetClientIpsWithConflictingHeaders()

public testGetClientIpsWithConflictingHeaders(mixed $httpForwarded, mixed $httpXForwardedFor) : mixed
Parameters
$httpForwarded : mixed
$httpXForwardedFor : mixed
Tags
dataProvider

getClientIpsWithConflictingHeadersProvider

Return values
mixed

testGetContentCanBeCalledTwiceWithResources()

public testGetContentCanBeCalledTwiceWithResources(mixed $first, mixed $second) : mixed
Parameters
$first : mixed
$second : mixed
Tags
dataProvider

getContentCanBeCalledTwiceWithResourcesProvider

requires

PHP 5.6

Return values
mixed

testGetContentCantBeCalledTwiceWithResources()

public testGetContentCantBeCalledTwiceWithResources(mixed $first, mixed $second) : mixed
Parameters
$first : mixed
$second : mixed
Tags
dataProvider

getContentCantBeCalledTwiceWithResourcesProvider

Return values
mixed

testGetContentReturnsResource()

public testGetContentReturnsResource() : mixed
Return values
mixed

testGetContentReturnsResourceWhenContentSetInConstructor()

public testGetContentReturnsResourceWhenContentSetInConstructor() : mixed
Return values
mixed

testGetContentType()

public testGetContentType() : mixed
Return values
mixed

testGetContentWorksTwiceInDefaultMode()

public testGetContentWorksTwiceInDefaultMode() : mixed
Return values
mixed

testGetEncodings()

public testGetEncodings() : mixed
Return values
mixed

testGetFormatFromMimeType()

public testGetFormatFromMimeType(mixed $format, mixed $mimeTypes) : mixed
Parameters
$format : mixed
$mimeTypes : mixed
Tags
dataProvider

getFormatToMimeTypeMapProviderWithAdditionalNullFormat

Return values
mixed

testGetFormatFromMimeTypeWithParameters()

public testGetFormatFromMimeTypeWithParameters() : mixed
Return values
mixed

testGetFormatWithCustomMimeType()

public testGetFormatWithCustomMimeType() : mixed
Return values
mixed

testGetHost()

public testGetHost() : mixed
Return values
mixed

testGetHostWithFakeHttpHostValue()

public testGetHostWithFakeHttpHostValue() : mixed
Return values
mixed

testGetLanguages()

public testGetLanguages() : mixed
Return values
mixed

testGetLocale()

public testGetLocale() : mixed
Return values
mixed

testGetMimeTypeFromFormat()

public testGetMimeTypeFromFormat(mixed $format, mixed $mimeTypes) : mixed
Parameters
$format : mixed
$mimeTypes : mixed
Tags
dataProvider

getFormatToMimeTypeMapProvider

Return values
mixed

testGetMimeTypesFromFormat()

public testGetMimeTypesFromFormat(mixed $format, mixed $mimeTypes) : mixed
Parameters
$format : mixed
$mimeTypes : mixed
Tags
dataProvider

getFormatToMimeTypeMapProvider

Return values
mixed

testGetMimeTypesFromInexistentFormat()

public testGetMimeTypesFromInexistentFormat() : mixed
Return values
mixed

testGetParameterPrecedence()

public testGetParameterPrecedence() : mixed
Return values
mixed

testGetPassword()

public testGetPassword() : mixed
Return values
mixed

testGetPathInfo()

public testGetPathInfo() : mixed
Return values
mixed

testGetPort()

public testGetPort() : mixed
Return values
mixed

testGetPreferredLanguage()

public testGetPreferredLanguage() : mixed
Return values
mixed

testGetQueryString()

public testGetQueryString(mixed $query, mixed $expectedQuery, mixed $msg) : mixed
Parameters
$query : mixed
$expectedQuery : mixed
$msg : mixed
Tags
dataProvider

getQueryStringNormalizationData

Return values
mixed

testGetQueryStringReturnsNull()

public testGetQueryStringReturnsNull() : mixed
Return values
mixed

testGetRelativeUriForPath()

public testGetRelativeUriForPath(mixed $expected, mixed $pathinfo, mixed $path) : mixed
Parameters
$expected : mixed
$pathinfo : mixed
$path : mixed
Tags
dataProvider

getRelativeUriForPathData()

Return values
mixed

testGetRequestFormat()

public testGetRequestFormat() : mixed
Return values
mixed

testGetRequestUri()

public testGetRequestUri(mixed $serverRequestUri, mixed $expected, mixed $message) : mixed
Parameters
$serverRequestUri : mixed
$expected : mixed
$message : mixed
Tags
dataProvider

getRequestUriData

Return values
mixed

testGetRequestUriWithoutRequiredHeader()

public testGetRequestUriWithoutRequiredHeader() : mixed
Return values
mixed

testGetSchemeAndHttpHost()

public testGetSchemeAndHttpHost() : mixed
Return values
mixed

testGetScriptName()

public testGetScriptName() : mixed
Return values
mixed

testGetSession()

public testGetSession() : mixed
Return values
mixed

testGetSetMethod()

public testGetSetMethod() : mixed
Return values
mixed

testGetTrustedHeaderName()

public testGetTrustedHeaderName() : mixed
Tags
group

legacy

Return values
mixed

testGetTrustedProxiesInvalidHeaderName()

public testGetTrustedProxiesInvalidHeaderName() : mixed
Tags
group

legacy

Return values
mixed

testGetUri()

public testGetUri() : mixed
Return values
mixed

testGetUriForPath()

public testGetUriForPath() : mixed
Return values
mixed

testGetUser()

public testGetUser() : mixed
Return values
mixed

testGetUserInfo()

public testGetUserInfo() : mixed
Return values
mixed

testHasPreviousSession()

public testHasPreviousSession() : mixed
Return values
mixed

testHasSession()

public testHasSession() : mixed
Return values
mixed

testHostValidity()

public testHostValidity(mixed $host, mixed $isValid[, mixed $expectedHost = null ][, mixed $expectedPort = null ]) : mixed
Parameters
$host : mixed
$isValid : mixed
$expectedHost : mixed = null
$expectedPort : mixed = null
Tags
dataProvider

getHostValidities

Return values
mixed

testIISRequestUri()

public testIISRequestUri(mixed $headers, mixed $server, mixed $expectedRequestUri) : mixed
Parameters
$headers : mixed
$server : mixed
$expectedRequestUri : mixed
Tags
dataProvider

iisRequestUriProvider

Return values
mixed

testInitialize()

public testInitialize() : mixed
Return values
mixed

testIntlLocale()

public testIntlLocale() : mixed
Tags
requires

extension intl

Return values
mixed

testIsMethod()

public testIsMethod() : mixed
Return values
mixed

testIsNoCache()

public testIsNoCache() : mixed
Return values
mixed

testIsXmlHttpRequest()

public testIsXmlHttpRequest() : mixed
Return values
mixed

testLegacyTrustedProxies()

public testLegacyTrustedProxies() : mixed
Tags
group

legacy

expectedDeprecation

The "Symfony\Component\HttpFoundation\Request::setTrustedHeaderName()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

Return values
mixed

testMethodCacheable()

public testMethodCacheable(mixed $method, mixed $cacheable) : mixed
Parameters
$method : mixed
$cacheable : mixed
Tags
dataProvider

methodCacheableProvider

Return values
mixed

testMethodIdempotent()

public testMethodIdempotent(mixed $method, mixed $idempotent) : mixed
Parameters
$method : mixed
$idempotent : mixed
Tags
dataProvider

methodIdempotentProvider

Return values
mixed

testMethodSafe()

public testMethodSafe(mixed $method, mixed $safe) : mixed
Parameters
$method : mixed
$safe : mixed
Tags
dataProvider

methodSafeProvider

Return values
mixed

testMethodSafeChecksCacheable()

public testMethodSafeChecksCacheable() : mixed
Tags
group

legacy

expectedDeprecation

Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since Symfony 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with false as first argument or use the Request::isMethodCacheable() instead.

Return values
mixed

testNonstandardRequests()

public testNonstandardRequests(mixed $requestUri, mixed $queryString, mixed $expectedPathInfo, mixed $expectedUri[, mixed $expectedBasePath = '' ][, mixed $expectedBaseUrl = null ]) : mixed
Parameters
$requestUri : mixed
$queryString : mixed
$expectedPathInfo : mixed
$expectedUri : mixed
$expectedBasePath : mixed = ''
$expectedBaseUrl : mixed = null
Tags
dataProvider

nonstandardRequestsData

Return values
mixed

testOverrideGlobals()

public testOverrideGlobals() : mixed
Return values
mixed

testProtocolVersion()

public testProtocolVersion(mixed $serverProtocol, mixed $trustedProxy, mixed $via, mixed $expected) : mixed
Parameters
$serverProtocol : mixed
$trustedProxy : mixed
$via : mixed
$expected : mixed
Tags
dataProvider

protocolVersionProvider

Return values
mixed

testSetDefaultLocale()

public testSetDefaultLocale() : mixed
Return values
mixed

testSetTrustedHostsDoesNotBreakOnSpecialCharacters()

public testSetTrustedHostsDoesNotBreakOnSpecialCharacters() : mixed
Return values
mixed

testSetTrustedProxiesInvalidHeaderName()

public testSetTrustedProxiesInvalidHeaderName() : mixed
Tags
group

legacy

Return values
mixed

testToString()

public testToString() : mixed
Return values
mixed

testTrustedHost()

public testTrustedHost() : mixed
Return values
mixed

testTrustedHosts()

public testTrustedHosts() : mixed
Return values
mixed

testTrustedPort()

public testTrustedPort() : mixed
Return values
mixed

testTrustedPortDoesNotDefaultToZero()

public testTrustedPortDoesNotDefaultToZero() : mixed
Return values
mixed

testTrustedProxiesForwarded()

public testTrustedProxiesForwarded() : mixed
Return values
mixed

testTrustedProxiesXForwardedFor()

public testTrustedProxiesXForwardedFor() : mixed
Return values
mixed

testUrlencodedStringPrefix()

public testUrlencodedStringPrefix(mixed $string, mixed $prefix, mixed $expect) : mixed
Parameters
$string : mixed
$prefix : mixed
$expect : mixed
Tags
dataProvider

urlencodedStringPrefixData

Return values
mixed

testVeryLongHosts()

public testVeryLongHosts(mixed $host) : mixed
Parameters
$host : mixed
Tags
dataProvider

getLongHostNames

Return values
mixed

urlencodedStringPrefixData()

public urlencodedStringPrefixData() : mixed
Return values
mixed

tearDown()

protected tearDown() : mixed
Return values
mixed

disableHttpMethodParameterOverride()

private disableHttpMethodParameterOverride() : mixed
Return values
mixed

getRequestInstanceForClientIpsForwardedTests()

private getRequestInstanceForClientIpsForwardedTests(mixed $remoteAddr, mixed $httpForwarded, mixed $trustedProxies) : mixed
Parameters
$remoteAddr : mixed
$httpForwarded : mixed
$trustedProxies : mixed
Return values
mixed

getRequestInstanceForClientIpTests()

private getRequestInstanceForClientIpTests(mixed $remoteAddr, mixed $httpForwardedFor, mixed $trustedProxies) : mixed
Parameters
$remoteAddr : mixed
$httpForwardedFor : mixed
$trustedProxies : mixed
Return values
mixed

Search results