PHP Class Neos\Flow\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest

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

Protected Properties

Property Type Description
$converter Neos\Flow\Property\TypeConverterInterface
$mockObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface | PHPUnit_Framework_MockObject_MockObject
$mockPersistenceManager Neos\Flow\Persistence\PersistenceManagerInterface | PHPUnit_Framework_MockObject_MockObject
$mockReflectionService Neos\Flow\Reflection\ReflectionService | PHPUnit_Framework_MockObject_MockObject

Public Methods

Method Description
canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject ( boolean $isEntity, boolean $isValueObject, boolean $expected )
checkMetadata ( )
convertFromReturnsTargetNotFoundErrorIfHandleArrayDataFails ( )
convertFromShouldCreateObject ( )
convertFromShouldCreateObjectWhenThereAreConstructorParameters ( )
convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters ( )
convertFromShouldFetchObjectFromPersistenceIfNonUuidStringIsGiven ( )
convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven ( )
convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven ( )
convertFromShouldReturnFirstMatchingObjectIfMultipleIdentityPropertiesExist ( )
convertFromShouldReturnNullForEmptyString ( )
convertFromShouldReturnTargetNotFoundErrorIfNoMatchingObjectWasFound ( )
convertFromShouldThrowExceptionIfIdentityIsOfInvalidType ( )
convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound ( )
convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet ( )
convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet ( )
convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet ( )
convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound ( )
dataProviderForCanConvert ( ) : array
getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty ( )
getTypeOfChildPropertyShouldConsiderConstructors ( )
getTypeOfChildPropertyShouldConsiderSetters ( )
getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet ( )
getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType ( )
setUp ( )
setupMockQuery ( integer $numberOfResults, PHPUnit_Framework_MockObject_Matcher_Invocation $howOftenIsGetFirstCalled ) : stdClass

Protected Methods

Method Description
buildConfiguration ( array $typeConverterOptions ) : PropertyMappingConfiguration

Method Details

buildConfiguration() protected method

protected buildConfiguration ( array $typeConverterOptions ) : PropertyMappingConfiguration
$typeConverterOptions array
return Neos\Flow\Property\PropertyMappingConfiguration

canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject() public method

public canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject ( boolean $isEntity, boolean $isValueObject, boolean $expected )
$isEntity boolean
$isValueObject boolean
$expected boolean

checkMetadata() public method

public checkMetadata ( )

convertFromReturnsTargetNotFoundErrorIfHandleArrayDataFails() public method

convertFromShouldCreateObject() public method

convertFromShouldCreateObjectWhenThereAreConstructorParameters() public method

convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters() public method

convertFromShouldFetchObjectFromPersistenceIfNonUuidStringIsGiven() public method

convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven() public method

convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven() public method

convertFromShouldReturnFirstMatchingObjectIfMultipleIdentityPropertiesExist() public method

convertFromShouldReturnNullForEmptyString() public method

convertFromShouldReturnTargetNotFoundErrorIfNoMatchingObjectWasFound() public method

convertFromShouldThrowExceptionIfIdentityIsOfInvalidType() public method

convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound() public method

convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet() public method

convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet() public method

convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet() public method

convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound() public method

dataProviderForCanConvert() public method

public dataProviderForCanConvert ( ) : array
return array

getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty() public method

getTypeOfChildPropertyShouldConsiderConstructors() public method

getTypeOfChildPropertyShouldConsiderSetters() public method

getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet() public method

getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType() public method

setUp() public method

public setUp ( )

setupMockQuery() public method

public setupMockQuery ( integer $numberOfResults, PHPUnit_Framework_MockObject_Matcher_Invocation $howOftenIsGetFirstCalled ) : stdClass
$numberOfResults integer
$howOftenIsGetFirstCalled PHPUnit_Framework_MockObject_Matcher_Invocation
return stdClass

Property Details

$converter protected property

protected TypeConverterInterface,Neos\Flow\Property $converter
return Neos\Flow\Property\TypeConverterInterface

$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

$mockReflectionService protected property

protected ReflectionService,Neos\Flow\Reflection|PHPUnit_Framework_MockObject_MockObject $mockReflectionService
return Neos\Flow\Reflection\ReflectionService | PHPUnit_Framework_MockObject_MockObject