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

Public Member Functions

 mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable ()
 
 fetchRelatedEagerReturnsNullForEmptyRelationHasOne ()
 
 fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne ()
 
 mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne ()
 
 mapDateTimeHandlesDifferentFieldEvaluationsDataProvider ()
 
 getPlainValueReturnsCorrectDateTimeFormat ()
 
 getPlainValueReturnsExpectedValues ($expectedValue, $input)
 
 getPlainValueReturnsExpectedValuesDataProvider ()
 
 getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy ()
 
 getPlainValueCallsGetUidOnDomainObjectInterfaceInput ()
 

Additional Inherited Members

- 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 inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 25 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

Member Function Documentation

fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne ( )

Test if fetchRelatedEager method returns empty array when $fieldValue = '' and relation type != RELATION_HAS_ONE

Test:

Definition at line 136 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

References BaseTestCase\getAccessibleMock(), and ColumnMap\RELATION_BELONGS_TO_MANY.

fetchRelatedEagerReturnsNullForEmptyRelationHasOne ( )

Test if fetchRelatedEager method returns NULL when $fieldValue = '' and relation type == RELATION_HAS_ONE

Test:

Definition at line 116 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

References BaseTestCase\getAccessibleMock(), and ColumnMap\RELATION_HAS_ONE.

getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy ( )
getPlainValueCallsGetUidOnDomainObjectInterfaceInput ( )
getPlainValueReturnsCorrectDateTimeFormat ( )
getPlainValueReturnsExpectedValues (   $expectedValue,
  $input 
)
Test:
getPlainValueReturnsExpectedValuesDataProvider

Definition at line 305 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

getPlainValueReturnsExpectedValuesDataProvider ( )
Returns
array

Definition at line 314 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

mapDateTimeHandlesDifferentFieldEvaluationsDataProvider ( )

Data provider for date checks. Date will be stored based on UTC in the database. That's why it's not possible to check for explicit date strings but using the date('c') conversion instead, which considers the current local timezone setting.

Returns
array

Definition at line 231 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne ( )

Test if fetchRelatedEager method returns NULL when $fieldValue = '' and relation type == RELATION_HAS_ONE without calling fetchRelated

Test:

Definition at line 157 of file Unit/Persistence/Generic/Mapper/DataMapperTest.php.

References BaseTestCase\getAccessibleMock(), and ColumnMap\RELATION_HAS_ONE.

mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable ( )