‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest:

Public Member Functions

 mapMapsArrayToObjectByCallingmapToObject ()
 
 mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable ()
 
 thawPropertiesSetsPropertyValues ()
 
 fetchRelatedEagerReturnsNullForEmptyRelationHasOne ()
 
 fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne ()
 
 thawPropertiesThrowsExceptionOnUnknownPropertyType ()
 
 mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne ()
 
 mapObjectToClassPropertyReturnsExistingObjectWithoutCallingFetchRelated ()
 
array mapDateTimeHandlesDifferentFieldEvaluationsDataProvider ()
 
 mapDateTimeHandlesDifferentFieldEvaluations ($value, $storageFormat, $expectedValue)
 
 mapDateTimeHandlesSubclassesOfDateTime ()
 
 getPlainValueReturnsCorrectDateTimeFormat ()
 
 getPlainValueReturnsExpectedValues ($expectedValue, $input)
 
array getPlainValueReturnsExpectedValuesDataProvider ()
 
 getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy ()
 
 getPlainValueCallsGetUidOnDomainObjectInterfaceInput ()
 

Detailed Description

Test case

Definition at line 33 of file DataMapperTest.php.

Member Function Documentation

◆ fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne ( )

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

Test:

Definition at line 135 of file DataMapperTest.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_BELONGS_TO_MANY.

◆ fetchRelatedEagerReturnsNullForEmptyRelationHasOne()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::fetchRelatedEagerReturnsNullForEmptyRelationHasOne ( )

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

Test:

Definition at line 115 of file DataMapperTest.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_ONE.

◆ getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy ( )
Test:

Definition at line 366 of file DataMapperTest.php.

◆ getPlainValueCallsGetUidOnDomainObjectInterfaceInput()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::getPlainValueCallsGetUidOnDomainObjectInterfaceInput ( )
Test:

Definition at line 379 of file DataMapperTest.php.

◆ getPlainValueReturnsCorrectDateTimeFormat()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::getPlainValueReturnsCorrectDateTimeFormat ( )
Test:

Definition at line 317 of file DataMapperTest.php.

◆ getPlainValueReturnsExpectedValues()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::getPlainValueReturnsExpectedValues (   $expectedValue,
  $input 
)
Test:
‪@dataProvider getPlainValueReturnsExpectedValuesDataProvider

Definition at line 333 of file DataMapperTest.php.

◆ getPlainValueReturnsExpectedValuesDataProvider()

array TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::getPlainValueReturnsExpectedValuesDataProvider ( )
Returns
‪array

Definition at line 342 of file DataMapperTest.php.

◆ mapDateTimeHandlesDifferentFieldEvaluations()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapDateTimeHandlesDifferentFieldEvaluations (   $value,
  $storageFormat,
  $expectedValue 
)
Parameters
string | int | null$value
string | null$storageFormat
string | null$expectedValue
Test:
‪@dataProvider mapDateTimeHandlesDifferentFieldEvaluationsDataProvider

Definition at line 278 of file DataMapperTest.php.

◆ mapDateTimeHandlesDifferentFieldEvaluationsDataProvider()

array TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::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 259 of file DataMapperTest.php.

◆ mapDateTimeHandlesSubclassesOfDateTime()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapDateTimeHandlesSubclassesOfDateTime ( )
Test:

Definition at line 298 of file DataMapperTest.php.

◆ mapMapsArrayToObjectByCallingmapToObject()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapMapsArrayToObjectByCallingmapToObject ( )
Test:

Definition at line 38 of file DataMapperTest.php.

◆ mapObjectToClassPropertyReturnsExistingObjectWithoutCallingFetchRelated()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapObjectToClassPropertyReturnsExistingObjectWithoutCallingFetchRelated ( )

Test if mapObjectToClassProperty method returns objects that are already registered in the persistence session without query it from the persistence layer

Test:

Definition at line 216 of file DataMapperTest.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_ONE.

◆ mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne ( )

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

Test:

Definition at line 193 of file DataMapperTest.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_ONE.

◆ mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable ( )
Test:

Definition at line 54 of file DataMapperTest.php.

◆ thawPropertiesSetsPropertyValues()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::thawPropertiesSetsPropertyValues ( )
Test:

Definition at line 69 of file DataMapperTest.php.

◆ thawPropertiesThrowsExceptionOnUnknownPropertyType()

TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest::thawPropertiesThrowsExceptionOnUnknownPropertyType ( )
Test:

Definition at line 153 of file DataMapperTest.php.