[TASK] Streamline creation of column maps
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Persistence / Generic / Mapper / DataMapFactoryTest.php
index ce56a21..0f58077 100644 (file)
@@ -389,6 +389,21 @@ class DataMapFactoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'));
                $this->assertSame($expected, $dataMapFactory->_call('resolveTableName', $className));
        }
+
+       /**
+        * @test
+        */
+       public function createColumnMapReturnsAValidColumnMap() {
+               /** @var $dataMapFactory \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory */
+               $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'));
+               $dataMapFactory->injectObjectManager($this->objectManager);
+
+               $this->assertEquals(
+                       new \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap('column', 'property'),
+                       $dataMapFactory->_call('createColumnMap', 'column', 'property')
+               );
+       }
+
 }
 
 ?>
\ No newline at end of file