TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapperTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\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)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 25 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 131 of file DataMapperTest.php.

References TYPO3\CMS\Core\Tests\BaseTestCase\getAccessibleMock(), and 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 114 of file DataMapperTest.php.

References TYPO3\CMS\Core\Tests\BaseTestCase\getAccessibleMock(), and 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 321 of file DataMapperTest.php.

◆ getPlainValueCallsGetUidOnDomainObjectInterfaceInput()

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

Definition at line 338 of file DataMapperTest.php.

◆ getPlainValueReturnsCorrectDateTimeFormat()

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

Definition at line 273 of file DataMapperTest.php.

◆ getPlainValueReturnsExpectedValues()

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

Definition at line 289 of file DataMapperTest.php.

◆ getPlainValueReturnsExpectedValuesDataProvider()

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

Definition at line 298 of file DataMapperTest.php.

◆ mapDateTimeHandlesDifferentFieldEvaluationsDataProvider()

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 215 of file DataMapperTest.php.

References TYPO3\CMS\Core\Tests\BaseTestCase\buildAccessibleProxy().

◆ 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 149 of file DataMapperTest.php.

References TYPO3\CMS\Core\Tests\BaseTestCase\getAccessibleMock(), TYPO3\CMS\Core\Tests\BaseTestCase\getUniqueId(), and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_ONE.

◆ mapSingleRowReturnsObjectFromPersistenceSessionIfAvailable()

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