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

Public Member Functions

 validSourceTypes ()
 
 invalidSourceTypes ()
 
 dataProviderForFindTypeConverter ()
 
 findTypeConverterShouldReturnHighestPriorityTypeConverterForSimpleType ($source, $targetType, $typeConverters, $expectedTypeConverter)
 
 dataProviderForObjectTypeConverters ()
 
 findTypeConverterShouldReturnConverterForTargetObjectIfItExists ($targetClass, $expectedTypeConverter, $typeConverters, $shouldFailWithException=false)
 
 convertShouldAskConfigurationBuilderForDefaultConfiguration ()
 
 doMappingReturnsSourceUnchangedIfAlreadyConverted ()
 
 doMappingReturnsSourceUnchangedIfAlreadyConvertedToCompositeType ()
 
 convertSkipsPropertiesIfConfiguredTo ()
 
 convertSkipsUnknownPropertiesIfConfiguredTo ()
 

Protected Member Functions

 setUp ()
 
 getMockTypeConverter ($name= '', $canConvertFrom=true, $properties=[], $typeOfSubObject= '')
 
- 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

 $mockConfigurationBuilder
 
 $mockConfiguration
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 34 of file PropertyMapperTest.php.

Member Function Documentation

convertShouldAskConfigurationBuilderForDefaultConfiguration ( )
convertSkipsPropertiesIfConfiguredTo ( )
convertSkipsUnknownPropertiesIfConfiguredTo ( )
dataProviderForFindTypeConverter ( )

Simple type conversion

Returns
array

Definition at line 138 of file PropertyMapperTest.php.

References PropertyMapperTest\getMockTypeConverter().

dataProviderForObjectTypeConverters ( )
Returns
array

Definition at line 195 of file PropertyMapperTest.php.

References PropertyMapperTest\getMockTypeConverter().

doMappingReturnsSourceUnchangedIfAlreadyConverted ( )
Test:

Definition at line 372 of file PropertyMapperTest.php.

References BaseTestCase\getAccessibleMock().

doMappingReturnsSourceUnchangedIfAlreadyConvertedToCompositeType ( )
Test:

Definition at line 384 of file PropertyMapperTest.php.

References BaseTestCase\getAccessibleMock().

findTypeConverterShouldReturnConverterForTargetObjectIfItExists (   $targetClass,
  $expectedTypeConverter,
  $typeConverters,
  $shouldFailWithException = false 
)
Test:
dataProviderForObjectTypeConverters
Parameters
mixed$targetClass
mixed$expectedTypeConverter
mixed$typeConverters
bool$shouldFailWithException
Exceptions
Exception
Returns
void

Definition at line 320 of file PropertyMapperTest.php.

References BaseTestCase\getAccessibleMock().

findTypeConverterShouldReturnHighestPriorityTypeConverterForSimpleType (   $source,
  $targetType,
  $typeConverters,
  $expectedTypeConverter 
)
Test:
dataProviderForFindTypeConverter
Parameters
mixed$source
mixed$targetType
mixed$typeConverters
mixed$expectedTypeConverter

Definition at line 184 of file PropertyMapperTest.php.

References BaseTestCase\getAccessibleMock().

getMockTypeConverter (   $name = '',
  $canConvertFrom = true,
  $properties = [],
  $typeOfSubObject = '' 
)
protected
invalidSourceTypes ( )
Returns
array

Definition at line 81 of file PropertyMapperTest.php.

setUp ( )
protected

Sets up this test case

Returns
void

Definition at line 45 of file PropertyMapperTest.php.

validSourceTypes ( )
Returns
array

Definition at line 54 of file PropertyMapperTest.php.

Member Data Documentation

$mockConfiguration
protected

Definition at line 38 of file PropertyMapperTest.php.

$mockConfigurationBuilder
protected

Definition at line 36 of file PropertyMapperTest.php.