PHP Class Neos\Flow\Tests\Unit\Mvc\Routing\RouteTest

Inheritance: extends Neos\Flow\Tests\UnitTestCase
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$mockObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface | PHPUnit_Framework_MockObject_MockObject
$mockPersistenceManager Neos\Flow\Persistence\PersistenceManagerInterface | PHPUnit_Framework_MockObject_MockObject
$route Neos\Flow\Mvc\Routing\Route
$routeValues array

Public Methods

Method Description
byDefaultRouteDoesNotResolveIfUriPatternContainsLessValuesThanAreSpecified ( )
compareAndRemoveMatchingDefaultValuesDataProvider ( ) Data provider
compareAndRemoveMatchingDefaultValuesTests ( array $defaults, array $routeValues, array $expectedModifiedRouteValues, boolean $expectedResult )
defaultValuesAreSetForUriPatternSegmentsWithMultipleOptionalRouteParts ( )
getMatchResultsReturnsCorrectResultsAfterSuccessfulMatch ( )
httpMethodConstraintsCanBeSetAndRetrieved ( )
ifAnObjectTypeIsSpecifiedTheIdentityRoutePartHandlerIsInstantiated ( )
matchesRecursivelyMergesMatchResults ( )
matchesThrowsExceptionIfRoutePartValueContainsObjects ( boolean $shouldThrowException, mixed $routePartValue )
matchesThrowsExceptionIfRoutePartValueContainsObjectsDataProvider ( ) Data provider
matchingRouteIsProperlyResolved ( )
parseSetsDefaultValueOfRouteParts ( )
parseSetsDefaultValueOfRoutePartsRecursively ( )
parseSetsUriPatternOfIdentityRoutePartIfSpecified ( )
registeredRoutePartHandlerIsInvokedWhenCallingMatch ( )
registeredRoutePartHandlerIsInvokedWhenCallingResolve ( )
resolvedUriPathIsNullAfterUnsuccessfulResolve ( )
resolvesAppendsDefaultValuesOfOptionalUriPartsToResolvedUriPath ( )
resolvesAppendsRemainingRouteValuesToResolvedUriPathIfAppendExceedingArgumentsIsTrue ( )
resolvesCallsCompareAndRemoveMatchingDefaultValues ( )
resolvesConvertsDomainObjectsToIdentityArrays ( )
resolvesKeepsCaseOfResolvedUriIfToLowerCaseIsFalse ( )
resolvesLowerCasesResolvedUriPathByDefault ( )
resolvesReturnsFalseIfNotAllRouteValuesCanBeResolved ( )
resolvesReturnsTrueIfTargetControllerExists ( )
resolvesThrowsExceptionIfRoutePartDefaultValueIsNoString ( )
resolvesThrowsExceptionIfRoutePartValueIsNoString ( )
routeAlwaysAppendsExceedingInternalArguments ( )
routeAlwaysAppendsExceedingInternalArgumentsRecursively ( )
routeAppendsAllAdditionalQueryParametersIfUriPatternContainsLessValuesThanAreSpecifiedIfAppendExceedingArgumentsIsTrue ( )
routeCanBeResolvedIfAComplexValueIsEqualToItsDefaultValue ( )
routeCanBeResolvedIfASpecifiedValueIsEqualToItsDefaultValue ( )
routeCantBeResolvedIfASpecifiedValueIsNotEqualToItsDefaultValue ( )
routeDoesNotMatchEmptyRequestPathIfUriPatternIsNotSet ( )
routeDoesNotMatchIfOneSegmentOfRequestPathIsDifferentFromItsRespectiveStaticUriPatternSegment ( )
routeDoesNotMatchIfRequestMethodIsNotAccepted ( )
routeDoesNotMatchIfRequestPathIsDifferentFromStaticUriPattern ( )
routeDoesNotMatchIfRequestPathIsEqualToStaticUriPatternWithoutSlashes ( )
routeDoesNotMatchIfRoutePartDoesNotMatchAndDefaultValueIsSet ( )
routeDoesNotMatchRequestPathContainingOnlySomeOfTheOptionalRouteParts ( )
routeDoesNotMatchRequestPathWithAllPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts ( )
routeDoesNotMatchRequestPathWithOnlyOneOptionalPartIfUriPatternContainsTwoSuccessiveOptionalRouteParts ( )
routeDoesNotMatchRequestPathWithOnlyOneOptionalPartIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts ( )
routeDoesNotMatchRequestPathWithRequiredAndOnlyOneOptionalPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts ( )
routeDoesNotResolveIfRouteValuesContainAnIdentityForAnArgumentThatIsNotPartOfTheRoute ( )
routeMatchesEmptyRequestPathIfUriPatternContainsOneOptionalDynamicRoutePartWithDefaultValue ( )
routeMatchesEmptyRequestPathIfUriPatternContainsOneOptionalStaticRoutePart ( )
routeMatchesEmptyRequestPathIfUriPatternIsEmpty ( )
routeMatchesIfRequestMethodIsAccepted ( )
routeMatchesIfRequestPathIsEqualToStaticUriPattern ( )
routeMatchesIfRoutePartDoesNotMatchButIsOptionalAndHasDefault ( )
routeMatchesIfStaticSegmentsMatchAndASegmentExistsForAllDynamicUriPartSegments ( )
routeMatchesRequestPathContainingAllOfTheOptionalRouteParts ( )
routeMatchesRequestPathContainingNoneOfTheOptionalRouteParts ( )
routeMatchesRequestPathWithAllPartsIfUriPatternContainsOneOptionalAndOneRequiredStaticRoutePart ( )
routeMatchesRequestPathWithAllPartsIfUriPatternContainsTwoOptionalAndOneRequiredStaticRoutePart ( )
routeMatchesRequestPathWithAllPartsIfUriPatternContainsTwoSuccessiveOptionalRouteParts ( )
routeMatchesRequestPathWithAllPartsIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsOneOptionalAndOneRequiredStaticRoutePart ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsOneRequiredAndOneOptionalStaticRoutePart ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsTwoOptionalAndOneRequiredStaticRoutePart ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsTwoSuccessiveOptionalRouteParts ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts ( )
routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts ( )
routePartHandlerIsInstantiated ( )
routeThrowsExceptionIfUriPatternContainsOneOptionalDynamicRoutePartWithoutDefaultValue ( )
setDefaultsAllowsToSetTheDefaultPackageControllerAndActionName ( )
setNameCorrectlySetsRouteName ( )
setUp ( ) Sets up this test case
settingInvalidRoutePartHandlerThrowsException ( )
settingUriPatternResetsRoute ( )
staticAndDynamicRoutesCanBeMixedInAnyOrder ( )
uriPatternSegmentCanContainTwoDynamicRouteParts ( )
uriPatternSegmentsCanContainMultipleDynamicRouteParts ( )
uriPatternWithLeadingSlashThrowsException ( )
uriPatternWithSuccessiveDynamicRoutepartsThrowsException ( )
uriPatternWithSuccessiveOptionalSectionsThrowsException ( )
uriPatternWithTrailingSlashThrowsException ( )
uriPatternWithUnopenedOptionalSectionsThrowsException ( )
uriPatternWithUnterminatedOptionalSectionsThrowsException ( )

Protected Methods

Method Description
routeMatchesPath ( string $routePath ) : boolean

Method Details

byDefaultRouteDoesNotResolveIfUriPatternContainsLessValuesThanAreSpecified() public method

compareAndRemoveMatchingDefaultValuesDataProvider() public method

Data provider

compareAndRemoveMatchingDefaultValuesTests() public method

public compareAndRemoveMatchingDefaultValuesTests ( array $defaults, array $routeValues, array $expectedModifiedRouteValues, boolean $expectedResult )
$defaults array
$routeValues array
$expectedModifiedRouteValues array
$expectedResult boolean

defaultValuesAreSetForUriPatternSegmentsWithMultipleOptionalRouteParts() public method

getMatchResultsReturnsCorrectResultsAfterSuccessfulMatch() public method

httpMethodConstraintsCanBeSetAndRetrieved() public method

ifAnObjectTypeIsSpecifiedTheIdentityRoutePartHandlerIsInstantiated() public method

matchesRecursivelyMergesMatchResults() public method

matchesThrowsExceptionIfRoutePartValueContainsObjects() public method

public matchesThrowsExceptionIfRoutePartValueContainsObjects ( boolean $shouldThrowException, mixed $routePartValue )
$shouldThrowException boolean
$routePartValue mixed

matchesThrowsExceptionIfRoutePartValueContainsObjectsDataProvider() public method

Data provider

matchingRouteIsProperlyResolved() public method

parseSetsDefaultValueOfRouteParts() public method

parseSetsDefaultValueOfRoutePartsRecursively() public method

parseSetsUriPatternOfIdentityRoutePartIfSpecified() public method

registeredRoutePartHandlerIsInvokedWhenCallingMatch() public method

registeredRoutePartHandlerIsInvokedWhenCallingResolve() public method

resolvedUriPathIsNullAfterUnsuccessfulResolve() public method

resolvesAppendsDefaultValuesOfOptionalUriPartsToResolvedUriPath() public method

resolvesAppendsRemainingRouteValuesToResolvedUriPathIfAppendExceedingArgumentsIsTrue() public method

resolvesCallsCompareAndRemoveMatchingDefaultValues() public method

resolvesConvertsDomainObjectsToIdentityArrays() public method

resolvesKeepsCaseOfResolvedUriIfToLowerCaseIsFalse() public method

resolvesLowerCasesResolvedUriPathByDefault() public method

resolvesReturnsFalseIfNotAllRouteValuesCanBeResolved() public method

resolvesReturnsTrueIfTargetControllerExists() public method

resolvesThrowsExceptionIfRoutePartDefaultValueIsNoString() public method

resolvesThrowsExceptionIfRoutePartValueIsNoString() public method

routeAlwaysAppendsExceedingInternalArguments() public method

routeAlwaysAppendsExceedingInternalArgumentsRecursively() public method

routeAppendsAllAdditionalQueryParametersIfUriPatternContainsLessValuesThanAreSpecifiedIfAppendExceedingArgumentsIsTrue() public method

routeCanBeResolvedIfAComplexValueIsEqualToItsDefaultValue() public method

routeCanBeResolvedIfASpecifiedValueIsEqualToItsDefaultValue() public method

routeCantBeResolvedIfASpecifiedValueIsNotEqualToItsDefaultValue() public method

routeDoesNotMatchEmptyRequestPathIfUriPatternIsNotSet() public method

routeDoesNotMatchIfOneSegmentOfRequestPathIsDifferentFromItsRespectiveStaticUriPatternSegment() public method

routeDoesNotMatchIfRequestMethodIsNotAccepted() public method

routeDoesNotMatchIfRequestPathIsDifferentFromStaticUriPattern() public method

routeDoesNotMatchIfRequestPathIsEqualToStaticUriPatternWithoutSlashes() public method

routeDoesNotMatchIfRoutePartDoesNotMatchAndDefaultValueIsSet() public method

routeDoesNotMatchRequestPathContainingOnlySomeOfTheOptionalRouteParts() public method

routeDoesNotMatchRequestPathWithAllPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts() public method

routeDoesNotMatchRequestPathWithOnlyOneOptionalPartIfUriPatternContainsTwoSuccessiveOptionalRouteParts() public method

routeDoesNotMatchRequestPathWithOnlyOneOptionalPartIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts() public method

routeDoesNotMatchRequestPathWithRequiredAndOnlyOneOptionalPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts() public method

routeDoesNotResolveIfRouteValuesContainAnIdentityForAnArgumentThatIsNotPartOfTheRoute() public method

routeMatchesEmptyRequestPathIfUriPatternContainsOneOptionalDynamicRoutePartWithDefaultValue() public method

routeMatchesEmptyRequestPathIfUriPatternContainsOneOptionalStaticRoutePart() public method

routeMatchesEmptyRequestPathIfUriPatternIsEmpty() public method

routeMatchesIfRequestMethodIsAccepted() public method

routeMatchesIfRequestPathIsEqualToStaticUriPattern() public method

routeMatchesIfRoutePartDoesNotMatchButIsOptionalAndHasDefault() public method

routeMatchesIfStaticSegmentsMatchAndASegmentExistsForAllDynamicUriPartSegments() public method

routeMatchesPath() protected method

protected routeMatchesPath ( string $routePath ) : boolean
$routePath string
return boolean

routeMatchesRequestPathContainingAllOfTheOptionalRouteParts() public method

routeMatchesRequestPathContainingNoneOfTheOptionalRouteParts() public method

routeMatchesRequestPathWithAllPartsIfUriPatternContainsOneOptionalAndOneRequiredStaticRoutePart() public method

routeMatchesRequestPathWithAllPartsIfUriPatternContainsTwoOptionalAndOneRequiredStaticRoutePart() public method

routeMatchesRequestPathWithAllPartsIfUriPatternContainsTwoSuccessiveOptionalRouteParts() public method

routeMatchesRequestPathWithAllPartsIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsOneOptionalAndOneRequiredStaticRoutePart() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsOneRequiredAndOneOptionalStaticRoutePart() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsTwoOptionalAndOneRequiredStaticRoutePart() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternContainsTwoSuccessiveOptionalRouteParts() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternEndsWithTwoSuccessiveOptionalRouteParts() public method

routeMatchesRequestPathWithOnlyRequiredPartsIfUriPatternStartsWithTwoSuccessiveOptionalRouteParts() public method

routePartHandlerIsInstantiated() public method

routeThrowsExceptionIfUriPatternContainsOneOptionalDynamicRoutePartWithoutDefaultValue() public method

setDefaultsAllowsToSetTheDefaultPackageControllerAndActionName() public method

setNameCorrectlySetsRouteName() public method

setUp() public method

Sets up this test case
public setUp ( )

settingInvalidRoutePartHandlerThrowsException() public method

settingUriPatternResetsRoute() public method

staticAndDynamicRoutesCanBeMixedInAnyOrder() public method

uriPatternSegmentCanContainTwoDynamicRouteParts() public method

uriPatternSegmentsCanContainMultipleDynamicRouteParts() public method

uriPatternWithLeadingSlashThrowsException() public method

uriPatternWithSuccessiveDynamicRoutepartsThrowsException() public method

uriPatternWithSuccessiveOptionalSectionsThrowsException() public method

uriPatternWithTrailingSlashThrowsException() public method

uriPatternWithUnopenedOptionalSectionsThrowsException() public method

uriPatternWithUnterminatedOptionalSectionsThrowsException() public method

Property Details

$mockObjectManager protected property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement|PHPUnit_Framework_MockObject_MockObject $mockObjectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface | PHPUnit_Framework_MockObject_MockObject

$mockPersistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence|PHPUnit_Framework_MockObject_MockObject $mockPersistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface | PHPUnit_Framework_MockObject_MockObject

$route protected property

protected Route,Neos\Flow\Mvc\Routing $route
return Neos\Flow\Mvc\Routing\Route

$routeValues protected property

protected array $routeValues
return array