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

Inheritance: extends Neos\Flow\Tests\UnitTestCase
Afficher le fichier Open project: neos/flow-development-collection

Protected Properties

Свойство Type Description
$identityRoutePart Neos\Flow\Mvc\Routing\IdentityRoutePart
$mockClassSchema Neos\Flow\Reflection\ClassSchema | PHPUnit_Framework_MockObject_MockObject
$mockObjectPathMappingRepository Neos\Flow\Mvc\Routing\ObjectPathMappingRepository | PHPUnit_Framework_MockObject_MockObject
$mockPersistenceManager Neos\Flow\Persistence\PersistenceManagerInterface | PHPUnit_Framework_MockObject_MockObject
$mockReflectionService Neos\Flow\Reflection\ReflectionService | PHPUnit_Framework_MockObject_MockObject

Méthodes publiques

Méthode Description
createPathSegmentForObjectProvider ( ) : array data provider for createPathSegmentForObjectTests()
createPathSegmentForObjectTests ( object $object, string $uriPattern, string $expectedResult ) : void
createPathSegmentForObjectThrowsInvalidUriPatterExceptionIfItSpecifiedPropertiesContainObjects ( )
findValueToMatchProvider ( ) : array data provider for findValueToMatchTests()
findValueToMatchReturnsAnEmptyStringIfTheCalculatedUriPatternIsEmpty ( )
findValueToMatchReturnsAnEmptyStringIfTheRoutePathIsEmpty ( )
findValueToMatchReturnsAnEmptyStringIfTheSpecifiedSplitStringCantBeFoundInTheRoutePath ( )
findValueToMatchTests ( string $routePath, string $uriPattern, string $splitString, string $expectedResult ) : void
getUriPatternReturnsAnEmptyStringIfObjectTypeHasNotIdentityPropertiesAndNoPatternWasSpecified ( )
getUriPatternReturnsBasedOnTheIdentityPropertiesOfTheObjectTypeIfNoPatternWasSpecified ( )
getUriPatternReturnsTheSpecifiedUriPatternIfItsNotEmpty ( )
matchValueReturnsFalseIfNoObjectPathMappingCouldBeFound ( )
matchValueReturnsFalseIfTheGivenValueIsEmptyOrNull ( )
matchValueSetsCaseSensitiveFlagIfLowerCaseIsFalse ( )
matchValueSetsTheIdentifierOfTheObjectPathMappingAndReturnsTrueIfAMatchingObjectPathMappingWasFound ( )
matchValueSetsTheRouteValueToTheUrlDecodedPathSegmentIfNoUriPatternIsSpecified ( )
resolveValueAcceptsIdentityArrays ( )
resolveValueAppendsCounterIfCreatedPathSegmentIsEmpty ( )
resolveValueAppendsCounterIfNoMatchingObjectPathMappingWasFoundAndCreatedPathSegmentIsNotUnique ( )
resolveValueConvertsCaseOfResolvedPathSegmentIfLowerCaseIsTrue ( )
resolveValueCreatesAndStoresANewObjectPathMappingIfNoMatchingObjectPathMappingWasFound ( )
resolveValueDoesNotAcceptObjectsWithMultiValueIdentifiers ( )
resolveValueKeepsCaseOfResolvedPathSegmentIfLowerCaseIsTrue ( )
resolveValueReturnsFalseIfTheGivenValueIsNotOfTheSpecifiedType ( )
resolveValueSetsCaseSensitiveFlagIfLowerCaseIsFalse ( )
resolveValueSetsTheRouteValueToTheUrlEncodedIdentifierIfNoUriPatternIsSpecified ( ) Makes also sure that identity route parts are encoded via rawurlencode (which encodes spaces to "%20") and not urlencode (which encodes spaces to "+"). According to RFC 3986 that is correct for path segments.
resolveValueSetsTheValueToThePathSegmentOfTheObjectPathMappingAndReturnsTrueIfAMatchingObjectPathMappingWasFound ( )
resolveValueThrowsInfiniteLoopExceptionIfNoUniquePathSegmentCantBeFound ( )
setUp ( ) Sets up this test case

Method Details

createPathSegmentForObjectProvider() public méthode

data provider for createPathSegmentForObjectTests()

createPathSegmentForObjectTests() public méthode

public createPathSegmentForObjectTests ( object $object, string $uriPattern, string $expectedResult ) : void
$object object
$uriPattern string
$expectedResult string
Résultat void

createPathSegmentForObjectThrowsInvalidUriPatterExceptionIfItSpecifiedPropertiesContainObjects() public méthode

findValueToMatchProvider() public méthode

data provider for findValueToMatchTests()
public findValueToMatchProvider ( ) : array
Résultat array

findValueToMatchReturnsAnEmptyStringIfTheCalculatedUriPatternIsEmpty() public méthode

findValueToMatchReturnsAnEmptyStringIfTheRoutePathIsEmpty() public méthode

findValueToMatchReturnsAnEmptyStringIfTheSpecifiedSplitStringCantBeFoundInTheRoutePath() public méthode

findValueToMatchTests() public méthode

public findValueToMatchTests ( string $routePath, string $uriPattern, string $splitString, string $expectedResult ) : void
$routePath string
$uriPattern string
$splitString string
$expectedResult string
Résultat void

getUriPatternReturnsAnEmptyStringIfObjectTypeHasNotIdentityPropertiesAndNoPatternWasSpecified() public méthode

getUriPatternReturnsBasedOnTheIdentityPropertiesOfTheObjectTypeIfNoPatternWasSpecified() public méthode

getUriPatternReturnsTheSpecifiedUriPatternIfItsNotEmpty() public méthode

matchValueReturnsFalseIfNoObjectPathMappingCouldBeFound() public méthode

matchValueReturnsFalseIfTheGivenValueIsEmptyOrNull() public méthode

matchValueSetsCaseSensitiveFlagIfLowerCaseIsFalse() public méthode

matchValueSetsTheIdentifierOfTheObjectPathMappingAndReturnsTrueIfAMatchingObjectPathMappingWasFound() public méthode

matchValueSetsTheRouteValueToTheUrlDecodedPathSegmentIfNoUriPatternIsSpecified() public méthode

resolveValueAcceptsIdentityArrays() public méthode

resolveValueAppendsCounterIfCreatedPathSegmentIsEmpty() public méthode

resolveValueAppendsCounterIfNoMatchingObjectPathMappingWasFoundAndCreatedPathSegmentIsNotUnique() public méthode

resolveValueConvertsCaseOfResolvedPathSegmentIfLowerCaseIsTrue() public méthode

resolveValueCreatesAndStoresANewObjectPathMappingIfNoMatchingObjectPathMappingWasFound() public méthode

resolveValueDoesNotAcceptObjectsWithMultiValueIdentifiers() public méthode

resolveValueKeepsCaseOfResolvedPathSegmentIfLowerCaseIsTrue() public méthode

resolveValueReturnsFalseIfTheGivenValueIsNotOfTheSpecifiedType() public méthode

resolveValueSetsCaseSensitiveFlagIfLowerCaseIsFalse() public méthode

resolveValueSetsTheRouteValueToTheUrlEncodedIdentifierIfNoUriPatternIsSpecified() public méthode

Makes also sure that identity route parts are encoded via rawurlencode (which encodes spaces to "%20") and not urlencode (which encodes spaces to "+"). According to RFC 3986 that is correct for path segments.

resolveValueSetsTheValueToThePathSegmentOfTheObjectPathMappingAndReturnsTrueIfAMatchingObjectPathMappingWasFound() public méthode

resolveValueThrowsInfiniteLoopExceptionIfNoUniquePathSegmentCantBeFound() public méthode

setUp() public méthode

Sets up this test case
public setUp ( )

Property Details

$identityRoutePart protected_oe property

protected IdentityRoutePart,Neos\Flow\Mvc\Routing $identityRoutePart
Résultat Neos\Flow\Mvc\Routing\IdentityRoutePart

$mockClassSchema protected_oe property

protected ClassSchema,Neos\Flow\Reflection|PHPUnit_Framework_MockObject_MockObject $mockClassSchema
Résultat Neos\Flow\Reflection\ClassSchema | PHPUnit_Framework_MockObject_MockObject

$mockObjectPathMappingRepository protected_oe property

protected ObjectPathMappingRepository,Neos\Flow\Mvc\Routing|PHPUnit_Framework_MockObject_MockObject $mockObjectPathMappingRepository
Résultat Neos\Flow\Mvc\Routing\ObjectPathMappingRepository | PHPUnit_Framework_MockObject_MockObject

$mockPersistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence|PHPUnit_Framework_MockObject_MockObject $mockPersistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface | PHPUnit_Framework_MockObject_MockObject

$mockReflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection|PHPUnit_Framework_MockObject_MockObject $mockReflectionService
Résultat Neos\Flow\Reflection\ReflectionService | PHPUnit_Framework_MockObject_MockObject