TYPO3 CMS  TYPO3_6-2
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

 mapMapsArrayToObjectByCallingmapToObject ()
 
 mapSingleRowReturnsObjectFromIdentityMapIfAvailable ()
 
 fetchRelatedEagerReturnsNullForEmptyRelationHasOne ()
 
 fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne ()
 
 mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne ()
 
 mapObjectToClassPropertyReturnsExistingObjectWithoutCallingFetchRelated ()
 
 mapDateTimeHandlesDifferentFieldEvaluationsDataProvider ()
 

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, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Test case

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

References $result, 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 103 of file DataMapperTest.php.

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

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

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

◆ mapMapsArrayToObjectByCallingmapToObject()

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

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

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

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

◆ mapSingleRowReturnsObjectFromIdentityMapIfAvailable()

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