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

Public Member Functions

 settersAndGettersWorkAsExpected ()
 
 uriForPrefixesArgumentsWithExtensionAndPluginNameAndSetsControllerArgument ()
 
 uriForRecursivelyMergesAndOverrulesControllerArgumentsWithArguments ()
 
 uriForOnlySetsActionArgumentIfSpecified ()
 
 uriForSetsControllerFromRequestIfControllerIsNotSet ()
 
 uriForSetsExtensionNameFromRequestIfExtensionNameIsNotSet ()
 
 uriForSetsPluginNameFromRequestIfPluginNameIsNotSet ()
 
 uriForDoesNotDisableCacheHashForNonCacheableActions ()
 
 buildBackendUriKeepsQueryParametersIfAddQueryStringIsSet ()
 
 buildBackendUriKeepsQueryParametersIfAddQueryStringMethodIsNotSet ()
 
 buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSetDataProvider ()
 
 buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSet (array $parameters, array $postArguments, array $excluded, $expected)
 
 buildBackendUriKeepsModuleQueryParametersIfAddQueryStringIsNotSet ()
 
 buildBackendUriMergesAndOverrulesQueryParametersWithArguments ()
 
 buildBackendUriConvertsDomainObjectsAfterArgumentsHaveBeenMerged ()
 
 buildBackendUriRespectsSection ()
 
 buildBackendUriCreatesAbsoluteUrisIfSpecified ()
 
 buildBackendUriWithQueryStringMethodPostGetMergesParameters ()
 
 buildBackendUriWithQueryStringMethodGetPostMergesParameters ()
 
 buildFrontendUriCreatesRelativeUrisByDefault ()
 
 buildFrontendUriDoesNotStripLeadingSlashesFromRelativeUris ()
 
 resetSetsAllOptionsToTheirDefaultValue ()
 
 buildTypolinkConfigurationRespectsSpecifiedTargetPageUid ()
 
 buildTypolinkConfigurationUsesCurrentPageUidIfTargetPageUidIsNotSet ()
 
 buildTypolinkConfigurationProperlySetsAdditionalArguments ()
 
 buildTypolinkConfigurationProperlySetsAddQueryString ()
 
 buildTypolinkConfigurationProperlySetsAddQueryStringMethod ()
 
 buildTypolinkConfigurationConvertsDomainObjects ()
 
 buildTypolinkConfigurationResolvesPageTypeFromFormat ()
 
 buildTypolinkConfigurationResolvesDefaultPageTypeFromFormatIfNoMappingIsConfigured ()
 
 buildTypolinkConfigurationResolvesDefaultPageTypeFromFormatIfFormatIsNotMapped ()
 
 buildTypolinkConfigurationDisablesCacheHashIfNoCacheIsSet ()
 
 buildTypolinkConfigurationDoesNotSetUseCacheHashOptionIfUseCacheHashIsDisabled ()
 
 buildTypolinkConfigurationConsidersSection ()
 
 buildTypolinkConfigurationLinkAccessRestrictedPagesSetting ()
 
 convertDomainObjectsToIdentityArraysConvertsDomainObjects ()
 
 convertDomainObjectsToIdentityArraysConvertsObjectStoragesWithDomainObjects ()
 
 tansientObjectsAreConvertedToAnArrayOfProperties ()
 
 tansientObjectsWithObjectStorageAreConvertedToAnArrayOfProperties ()
 
 tansientObjectsAreRecursivelyConverted ()
 
 removeDefaultControllerAndActionDoesNotModifyArgumentsifSpecifiedControlerAndActionIsNotEqualToDefaults ()
 
 removeDefaultControllerAndActionRemovesControllerIfItIsEqualToTheDefault ()
 
 removeDefaultControllerAndActionRemovesActionIfItIsEqualToTheDefault ()
 
 removeDefaultControllerAndActionRemovesControllerAndActionIfBothAreEqualToTheDefault ()
 
 convertIteratorToArrayConvertsIteratorsToArrayProvider ()
 
 convertIteratorToArrayConvertsIteratorsToArray ($iterator)
 

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

 $mockConfigurationManager
 
 $mockContentObject
 
 $mockRequest
 
 $mockExtensionService
 
 $uriBuilder
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Private Member Functions

 rawUrlEncodeSquareBracketsInUrl ($string)
 

Detailed Description

Test case

Definition at line 36 of file UriBuilderTest.php.

Member Function Documentation

buildBackendUriConvertsDomainObjectsAfterArgumentsHaveBeenMerged ( )
buildBackendUriCreatesAbsoluteUrisIfSpecified ( )
buildBackendUriKeepsModuleQueryParametersIfAddQueryStringIsNotSet ( )
Test:

Definition at line 333 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriKeepsQueryParametersIfAddQueryStringIsSet ( )
Test:

Definition at line 209 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriKeepsQueryParametersIfAddQueryStringMethodIsNotSet ( )
Test:

Definition at line 224 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriMergesAndOverrulesQueryParametersWithArguments ( )
Test:

Definition at line 344 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSet ( array  $parameters,
array  $postArguments,
array  $excluded,
  $expected 
)
Test:
buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSetDataProvider
Parameters
array$parameters
array$postArguments
array$excluded
string$expected

Definition at line 319 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSetDataProvider ( )

return array

Definition at line 239 of file UriBuilderTest.php.

buildBackendUriRespectsSection ( )
Test:

Definition at line 370 of file UriBuilderTest.php.

References GeneralUtility\_GETset().

buildBackendUriWithQueryStringMethodGetPostMergesParameters ( )
buildBackendUriWithQueryStringMethodPostGetMergesParameters ( )
buildFrontendUriCreatesRelativeUrisByDefault ( )
Test:

Definition at line 488 of file UriBuilderTest.php.

buildFrontendUriDoesNotStripLeadingSlashesFromRelativeUris ( )
Test:

Definition at line 499 of file UriBuilderTest.php.

buildTypolinkConfigurationConsidersSection ( )
Test:

Definition at line 750 of file UriBuilderTest.php.

buildTypolinkConfigurationConvertsDomainObjects ( )
Test:

Definition at line 642 of file UriBuilderTest.php.

References BaseTestCase\getAccessibleMock().

buildTypolinkConfigurationDisablesCacheHashIfNoCacheIsSet ( )
Test:

Definition at line 726 of file UriBuilderTest.php.

buildTypolinkConfigurationDoesNotSetUseCacheHashOptionIfUseCacheHashIsDisabled ( )
Test:

Definition at line 738 of file UriBuilderTest.php.

buildTypolinkConfigurationLinkAccessRestrictedPagesSetting ( )
Test:

Definition at line 762 of file UriBuilderTest.php.

buildTypolinkConfigurationProperlySetsAdditionalArguments ( )
Test:

Definition at line 605 of file UriBuilderTest.php.

buildTypolinkConfigurationProperlySetsAddQueryString ( )
Test:

Definition at line 617 of file UriBuilderTest.php.

buildTypolinkConfigurationProperlySetsAddQueryStringMethod ( )
Test:

Definition at line 629 of file UriBuilderTest.php.

buildTypolinkConfigurationResolvesDefaultPageTypeFromFormatIfFormatIsNotMapped ( )
Test:

Definition at line 703 of file UriBuilderTest.php.

References UriBuilderTest\$mockConfigurationManager.

buildTypolinkConfigurationResolvesDefaultPageTypeFromFormatIfNoMappingIsConfigured ( )
Test:

Definition at line 681 of file UriBuilderTest.php.

References UriBuilderTest\$mockConfigurationManager.

buildTypolinkConfigurationResolvesPageTypeFromFormat ( )
Test:

Definition at line 658 of file UriBuilderTest.php.

References UriBuilderTest\$mockConfigurationManager.

buildTypolinkConfigurationRespectsSpecifiedTargetPageUid ( )
Test:

Definition at line 582 of file UriBuilderTest.php.

References $GLOBALS.

buildTypolinkConfigurationUsesCurrentPageUidIfTargetPageUidIsNotSet ( )
Test:

Definition at line 594 of file UriBuilderTest.php.

References $GLOBALS.

convertDomainObjectsToIdentityArraysConvertsDomainObjects ( )
Test:

Definition at line 774 of file UriBuilderTest.php.

References BaseTestCase\getAccessibleMock().

convertDomainObjectsToIdentityArraysConvertsObjectStoragesWithDomainObjects ( )
Test:

Definition at line 788 of file UriBuilderTest.php.

References BaseTestCase\getAccessibleMock().

convertIteratorToArrayConvertsIteratorsToArray (   $iterator)

convertIteratorToArrayConvertsIteratorsToArrayProvider

Test:

Definition at line 975 of file UriBuilderTest.php.

convertIteratorToArrayConvertsIteratorsToArrayProvider ( )
Returns
array

Definition at line 962 of file UriBuilderTest.php.

rawUrlEncodeSquareBracketsInUrl (   $string)
private

Encodes square brackets in URL.

Parameters
string$string
Returns
string

Definition at line 467 of file UriBuilderTest.php.

Referenced by UriBuilderTest\buildBackendUriWithQueryStringMethodGetPostMergesParameters(), and UriBuilderTest\buildBackendUriWithQueryStringMethodPostGetMergesParameters().

removeDefaultControllerAndActionDoesNotModifyArgumentsifSpecifiedControlerAndActionIsNotEqualToDefaults ( )
Test:

Definition at line 902 of file UriBuilderTest.php.

removeDefaultControllerAndActionRemovesActionIfItIsEqualToTheDefault ( )
Test:

Definition at line 932 of file UriBuilderTest.php.

removeDefaultControllerAndActionRemovesControllerAndActionIfBothAreEqualToTheDefault ( )
Test:

Definition at line 947 of file UriBuilderTest.php.

removeDefaultControllerAndActionRemovesControllerIfItIsEqualToTheDefault ( )
Test:

Definition at line 917 of file UriBuilderTest.php.

resetSetsAllOptionsToTheirDefaultValue ( )
Test:

Definition at line 560 of file UriBuilderTest.php.

settersAndGettersWorkAsExpected ( )
Test:

Definition at line 89 of file UriBuilderTest.php.

setUp ( )
protected
Exceptions
InvalidArgumentException
PHPUnit_Framework_Exception

Definition at line 67 of file UriBuilderTest.php.

References $GLOBALS, and BaseTestCase\getAccessibleMock().

tansientObjectsAreConvertedToAnArrayOfProperties ( )
Test:

Definition at line 831 of file UriBuilderTest.php.

References UriBuilderTest\$uriBuilder.

tansientObjectsAreRecursivelyConverted ( )
Test:

Definition at line 874 of file UriBuilderTest.php.

References UriBuilderTest\$uriBuilder.

tansientObjectsWithObjectStorageAreConvertedToAnArrayOfProperties ( )
Test:

Definition at line 844 of file UriBuilderTest.php.

References UriBuilderTest\$uriBuilder.

uriForDoesNotDisableCacheHashForNonCacheableActions ( )
Test:

Definition at line 199 of file UriBuilderTest.php.

uriForOnlySetsActionArgumentIfSpecified ( )
Test:

Definition at line 152 of file UriBuilderTest.php.

uriForPrefixesArgumentsWithExtensionAndPluginNameAndSetsControllerArgument ( )
Test:

Definition at line 126 of file UriBuilderTest.php.

References $GLOBALS.

uriForRecursivelyMergesAndOverrulesControllerArgumentsWithArguments ( )
Test:

Definition at line 138 of file UriBuilderTest.php.

uriForSetsControllerFromRequestIfControllerIsNotSet ( )
Test:

Definition at line 163 of file UriBuilderTest.php.

uriForSetsExtensionNameFromRequestIfExtensionNameIsNotSet ( )
Test:

Definition at line 175 of file UriBuilderTest.php.

uriForSetsPluginNameFromRequestIfPluginNameIsNotSet ( )
Test:

Definition at line 187 of file UriBuilderTest.php.

Member Data Documentation

$mockContentObject
protected

Definition at line 46 of file UriBuilderTest.php.

$mockExtensionService
protected

Definition at line 56 of file UriBuilderTest.php.

$mockRequest
protected

Definition at line 51 of file UriBuilderTest.php.