‪TYPO3CMS  10.4
DataMapFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
30 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
31 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 
36 class ‪DataMapFactoryTest extends UnitTestCase
37 {
41  public function ‪oneToOneRelation()
42  {
43  return [
44  ['Tx_Myext_Domain_Model_Foo'],
45  [FrontendUser::class]
46  ];
47  }
48 
53  public function ‪setRelationsDetectsOneToOneRelation($className)
54  {
55  $mockColumnMap = $this->createMock(ColumnMap::class);
56  $columnConfiguration = [
57  'type' => 'select',
58  'foreign_table' => 'tx_myextension_bar',
59  'foreign_field' => 'parentid'
60  ];
61  $type = $className;
62  $elementType = null;
63  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
64  $mockDataMapFactory->expects(self::once())->method('setOneToOneRelation')->willReturn($mockColumnMap);
65  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
66  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
67  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
68  }
69 
74  {
75  $mockColumnMap = $this->createMock(ColumnMap::class);
76  $matchFields = [
77  'fieldname' => 'foo_model'
78  ];
79  $columnConfiguration = [
80  'type' => 'select',
81  'foreign_table' => 'tx_myextension_bar',
82  'foreign_field' => 'parentid',
83  'foreign_match_fields' => $matchFields
84  ];
85 
86  $mockColumnMap->expects(self::once())
87  ->method('setRelationTableMatchFields')
88  ->with($matchFields);
89  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
90  $mockDataMapFactory->_call('setOneToOneRelation', $mockColumnMap, $columnConfiguration);
91  }
92 
97  {
98  $mockColumnMap = $this->createMock(ColumnMap::class);
99  $matchFields = [
100  'fieldname' => 'foo_model'
101  ];
102  $columnConfiguration = [
103  'type' => 'select',
104  'foreign_table' => 'tx_myextension_bar',
105  'foreign_field' => 'parentid',
106  'foreign_match_fields' => $matchFields
107  ];
108 
109  $mockColumnMap->expects(self::once())
110  ->method('setRelationTableMatchFields')
111  ->with($matchFields);
112  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
113  $mockDataMapFactory->_call('setOneToManyRelation', $mockColumnMap, $columnConfiguration);
114  }
115 
120  {
121  $mockColumnMap = $this->createMock(ColumnMap::class);
122  $columnConfiguration = [
123  'type' => 'select',
124  'foreign_table' => 'tx_myextension_bar',
125  'MM' => 'tx_myextension_mm'
126  ];
127  $type = 'Tx_Myext_Domain_Model_Foo';
128  $elementType = null;
129  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
130  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
131  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
132  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
133  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
134  }
135 
140  {
141  $mockColumnMap = $this->createMock(ColumnMap::class);
142  $columnConfiguration = [
143  'type' => 'select',
144  'foreign_table' => 'tx_myextension_bar',
145  'foreign_field' => 'parentid',
146  'foreign_table_field' => 'parenttable'
147  ];
148  $type = ObjectStorage::class;
149  $elementType = 'Tx_Myext_Domain_Model_Foo';
150  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
151  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
152  $mockDataMapFactory->expects(self::once())->method('setOneToManyRelation')->willReturn($mockColumnMap);
153  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
154  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
155  }
156 
161  {
162  $columnMap = new ‪ColumnMap('foo', 'foo');
163  $columnConfiguration = [
164  'type' => 'select',
165  'renderType' => 'selectSingle',
166  'items' => [
167  ['One', 1],
168  ['Two', 2],
169  ['Three', 3],
170  ],
171  ];
172  $type = null;
173  $elementType = null;
174  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
175  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
176  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
177  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
178  $actualColumnMap = $mockDataMapFactory->_call('setRelations', $columnMap, $columnConfiguration, $type, $elementType);
179  self::assertSame($columnMap::RELATION_NONE, $actualColumnMap->getTypeOfRelation());
180  }
181 
186  {
187  return [
188  'maxitems not set' => ['', 'RELATION_HAS_MANY'],
189  'maxitems equals 1' => ['1', 'RELATION_NONE'],
190  'maxitems higher than 1' => ['10', 'RELATION_HAS_MANY']
191  ];
192  }
193 
199  public function ‪setRelationsDetectsTypeGroupAndRelationManyToMany($maxitems, $relation)
200  {
201  $columnMap = new ‪ColumnMap('foo', 'foo');
202  if (empty($maxitems)) {
203  $columnConfiguration = [
204  'type' => 'group',
205  ];
206  } else {
207  $columnConfiguration = [
208  'type' => 'group',
209  'maxitems' => $maxitems
210  ];
211  }
212  $type = null;
213  $elementType = null;
214  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
215  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
216  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
217  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
218  $actualColumnMap = $mockDataMapFactory->_call('setRelations', $columnMap, $columnConfiguration, $type, $elementType);
219  self::assertSame($relation, $actualColumnMap->getTypeOfRelation());
220  }
221 
226  {
227  $mockColumnMap = $this->createMock(ColumnMap::class);
228  $columnConfiguration = [
229  'type' => 'select',
230  'foreign_table' => 'tx_myextension_bar',
231  'MM' => 'tx_myextension_mm'
232  ];
233  $type = ObjectStorage::class;
234  $elementType = 'Tx_Myext_Domain_Model_Foo';
235  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
236  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
237  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
238  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
239  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
240  }
241 
246  {
247  $mockColumnMap = $this->createMock(ColumnMap::class);
248  $columnConfiguration = [
249  'type' => 'inline',
250  'foreign_table' => 'tx_myextension_righttable',
251  'MM' => 'tx_myextension_mm'
252  ];
253  $type = ObjectStorage::class;
254  $elementType = 'Tx_Myext_Domain_Model_Foo';
255  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
256  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
257  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
258  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
259  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
260  }
261 
266  {
267  $leftColumnsDefinition = [
268  'rights' => [
269  'type' => 'select',
270  'foreign_table' => 'tx_myextension_righttable',
271  'foreign_table_where' => 'WHERE 1=1',
272  'MM' => 'tx_myextension_mm',
273  'MM_table_where' => 'WHERE 2=2'
274  ]
275  ];
276  $mockColumnMap = $this->createMock(ColumnMap::class);
277  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
278  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
279  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_righttable'));
280  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting'));
281  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_local'));
282  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
283  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
284  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
285  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
286  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
287  }
288 
293  {
294  $rightColumnsDefinition = [
295  'lefts' => [
296  'type' => 'select',
297  'foreign_table' => 'tx_myextension_lefttable',
298  'MM' => 'tx_myextension_mm',
299  'MM_opposite_field' => 'rights'
300  ]
301  ];
302  $leftColumnsDefinition = [];
303  $leftColumnsDefinition['rights']['MM_opposite_field'] = 'opposite_field';
304  $mockColumnMap = $this->createMock(ColumnMap::class);
305  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
306  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
307  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_lefttable'));
308  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting_foreign'));
309  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_foreign'));
310  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
311  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
312  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
313  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
314  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $rightColumnsDefinition['lefts']);
315  }
316 
321  {
322  $leftColumnsDefinition = [
323  'rights' => [
324  'type' => 'inline',
325  'foreign_table' => 'tx_myextension_righttable',
326  'MM' => 'tx_myextension_mm',
327  'foreign_sortby' => 'sorting'
328  ]
329  ];
330  $mockColumnMap = $this->createMock(ColumnMap::class);
331  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
332  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
333  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_righttable'));
334  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting'));
335  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_local'));
336  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
337  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
338  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
339  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getColumnsDefinition'], [], '', false);
340  $mockDataMapFactory->expects(self::never())->method('getColumnsDefinition');
341  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
342  }
343 
348  {
349  $leftColumnsDefinition = [
350  'rights' => [
351  'type' => 'select',
352  'foreign_table' => 'tx_myextension_righttable',
353  'foreign_table_where' => 'WHERE 1=1',
354  'MM' => 'tx_myextension_mm'
355  ]
356  ];
357  $mockColumnMap = $this->createMock(ColumnMap::class);
358  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
359  $mockColumnMap->expects(self::once())->method('getRelationTableName')->willReturn('tx_myextension_mm');
360  $mockColumnMap->expects(self::never())->method('setrelationTablePageIdColumnName');
361  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
362  $mockDataMapFactory->expects(self::once())->method('getControlSection')->with(self::equalTo('tx_myextension_mm'))->willReturn(null);
363  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
364  }
365 
370  {
371  $leftColumnsDefinition = [
372  'rights' => [
373  'type' => 'select',
374  'foreign_table' => 'tx_myextension_righttable',
375  'foreign_table_where' => 'WHERE 1=1',
376  'MM' => 'tx_myextension_mm'
377  ]
378  ];
379  $mockColumnMap = $this->createMock(ColumnMap::class);
380  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
381  $mockColumnMap->expects(self::once())->method('getRelationTableName')->willReturn('tx_myextension_mm');
382  $mockColumnMap->expects(self::once())->method('setrelationTablePageIdColumnName')->with(self::equalTo('pid'));
383  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
384  $mockDataMapFactory->expects(self::once())->method('getControlSection')->with(self::equalTo('tx_myextension_mm'))->willReturn(['ctrl' => ['foo' => 'bar']]);
385  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
386  }
387 
392  {
393  return [
394  'date field' => ['date', 'date'],
395  'datetime field' => ['datetime', 'datetime'],
396  'time field' => ['time', 'time'],
397  'no date/datetime/time field' => ['', null],
398  ];
399  }
400 
408  {
409  $columnDefinition = [
410  'type' => 'input',
411  'dbType' => $type,
412  'eval' => $type,
413  ];
414 
415  $mockColumnMap = $this->getMockBuilder(ColumnMap::class)
416  ->setMethods(['setDateTimeStorageFormat'])
417  ->disableOriginalConstructor()
418  ->getMock();
419 
420  if ($expectedValue !== null) {
421  $mockColumnMap->expects(self::once())->method('setDateTimeStorageFormat')->with(self::equalTo($type));
422  } else {
423  $mockColumnMap->expects(self::never())->method('setDateTimeStorageFormat');
424  }
425 
426  $accessibleDataMapFactory = $this->getAccessibleMock(
427  DataMapFactory::class,
428  ['dummy'],
429  [],
430  '',
431  false
432  );
433  $accessibleDataMapFactory->_call('setFieldEvaluations', $mockColumnMap, $columnDefinition);
434  }
435 
440  {
441  $this->expectException(InvalidClassException::class);
442  // @TODO expectExceptionCode is 0
443  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
444  $cacheMock = $this->getMockBuilder(VariableFrontend::class)
445  ->setMethods(['get'])
446  ->disableOriginalConstructor()
447  ->getMock();
448  $cacheMock->expects(self::any())->method('get')->willReturn(false);
449  $mockDataMapFactory->_set('dataMapCache', $cacheMock);
450  $mockDataMapFactory->buildDataMap('UnknownObject');
451  }
452 
457  {
458  self::markTestSkipped('Incomplete mocking in a complex scenario. This should be a functional test');
459  $configuration = [
460  'persistence' => [
461  'classes' => [
462  FrontendUser::class => [
463  'subclasses' => [
464  'Tx_SampleExt_Domain_Model_LevelOne1' => 'Tx_SampleExt_Domain_Model_LevelOne1',
465  'Tx_SampleExt_Domain_Model_LevelOne2' => 'Tx_SampleExt_Domain_Model_LevelOne2'
466  ]
467  ],
468  'Tx_SampleExt_Domain_Model_LevelOne1' => [
469  'subclasses' => [
470  'Tx_SampleExt_Domain_Model_LevelTwo1' => 'Tx_SampleExt_Domain_Model_LevelTwo1',
471  'Tx_SampleExt_Domain_Model_LevelTwo2' => 'Tx_SampleExt_Domain_Model_LevelTwo2'
472  ]
473  ],
474  'Tx_SampleExt_Domain_Model_LevelOne2' => [
475  'subclasses' => []
476  ]
477  ]
478  ]
479  ];
480  $expectedSubclasses = [
481  'Tx_SampleExt_Domain_Model_LevelOne1',
482  'Tx_SampleExt_Domain_Model_LevelTwo1',
483  'Tx_SampleExt_Domain_Model_LevelTwo2',
484  'Tx_SampleExt_Domain_Model_LevelOne2'
485  ];
486 
488  $objectManager = $this->getMockBuilder(ObjectManager::class)
489  ->setMethods(['dummy'])
490  ->disableOriginalConstructor()
491  ->getMock();
492 
494  $configurationManager = $this->createMock(ConfigurationManager::class);
495  $configurationManager->expects(self::once())->method('getConfiguration')->with('Framework')->willReturn($configuration);
497  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['test']);
498  $dataMapFactory->_set('reflectionService', new ‪ReflectionService());
499  $dataMapFactory->_set('objectManager', $objectManager);
500  $dataMapFactory->_set('configurationManager', $configurationManager);
501  $cacheMock = $this->createMock(VariableFrontend::class);
502  $cacheMock->expects(self::any())->method('get')->willReturn(false);
503  $dataMapFactory->_set('dataMapCache', $cacheMock);
504  $dataMap = $dataMapFactory->buildDataMap(FrontendUser::class);
505  self::assertSame($expectedSubclasses, $dataMap->getSubclasses());
506  }
507 
512  {
513  return [
514  'Core classes' => [LogEntry::class, 'tx_belog_domain_model_logentry'],
515  'Core classes with namespaces and leading backslash' => [LogEntry::class, 'tx_belog_domain_model_logentry'],
516  'Extension classes' => ['ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'],
517  'Extension classes with namespaces and leading backslash' => ['\\ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'],
518  ];
519  }
520 
525  public function ‪resolveTableNameReturnsExpectedTablenames($className, $expected)
526  {
527  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
528  self::assertSame($expected, $dataMapFactory->_call('resolveTableName', $className));
529  }
530 
535  {
537  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
538 
540  $objectManager = $this->createMock(ObjectManager::class);
541  $columnMap = $this->getMockBuilder(ColumnMap::class)
542  ->setConstructorArgs(['column', 'property'])
543  ->getMock();
544  $objectManager->expects(self::once())->method('get')->willReturn($columnMap);
545 
546  $dataMapFactory->_set('objectManager', $objectManager);
547 
548  self::assertEquals(
549  $columnMap,
550  $dataMapFactory->_call('createColumnMap', 'column', 'property')
551  );
552  }
553 
558  {
559  return [
560  [['type' => 'input'], ‪TableColumnType::INPUT, null],
561  [['type' => 'text'], ‪TableColumnType::TEXT, null],
562  [['type' => 'check'], ‪TableColumnType::CHECK, null],
563  [['type' => 'radio'], ‪TableColumnType::RADIO, null],
564  [['type' => 'select'], ‪TableColumnType::SELECT, null],
565  [['type' => 'group', 'internal_type' => 'db'], ‪TableColumnType::GROUP, ‪TableColumnSubType::DB],
566  [['type' => 'group', 'internal_type' => 'folder'], ‪TableColumnType::GROUP, ‪TableColumnSubType::FOLDER],
567  [['type' => 'none'], ‪TableColumnType::NONE, null],
568  [['type' => 'passthrough'], ‪TableColumnType::PASSTHROUGH, null],
569  [['type' => 'user'], ‪TableColumnType::USER, null],
570  [['type' => 'flex'], ‪TableColumnType::FLEX, null],
571  [['type' => 'inline'], ‪TableColumnType::INLINE, null],
572  [['type' => 'slug'], ‪TableColumnType::SLUG, null],
573  ];
574  }
575 
584  public function ‪setTypeDetectsTypeAndInternalTypeProperly(array $columnConfiguration, $type, $internalType)
585  {
587  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
588 
590  $columnMap = $this->getAccessibleMock(ColumnMap::class, ['dummy'], [], '', false);
591 
592  $dataMapFactory->_call('setType', $columnMap, $columnConfiguration);
593 
594  self::assertEquals($type, (string)$columnMap->getType());
595  self::assertEquals($internalType, (string)$columnMap->getInternalType());
596  }
597 }
‪TYPO3\CMS\Core\DataHandling\TableColumnType\SELECT
‪const SELECT
Definition: TableColumnType.php:34
‪TYPO3\CMS\Core\DataHandling\TableColumnSubType\DB
‪const DB
Definition: TableColumnSubType.php:32
‪TYPO3\CMS\Core\DataHandling\TableColumnType\INLINE
‪const INLINE
Definition: TableColumnType.php:40
‪TYPO3\CMS\Core\DataHandling\TableColumnType\GROUP
‪const GROUP
Definition: TableColumnType.php:35
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\classNameTableNameMappings
‪array classNameTableNameMappings()
Definition: DataMapFactoryTest.php:511
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\settingOneToOneRelationSetsRelationTableMatchFields
‪settingOneToOneRelationSetsRelationTableMatchFields()
Definition: DataMapFactoryTest.php:73
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setTypeDetectsTypeAndInternalTypeProperly
‪setTypeDetectsTypeAndInternalTypeProperly(array $columnConfiguration, $type, $internalType)
Definition: DataMapFactoryTest.php:584
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest
Definition: DataMapFactoryTest.php:37
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithFieldEvaluationsForDateTimeFieldsDataProvider
‪array columnMapIsInitializedWithFieldEvaluationsForDateTimeFieldsDataProvider()
Definition: DataMapFactoryTest.php:391
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\createColumnMapReturnsAValidColumnMap
‪createColumnMapReturnsAValidColumnMap()
Definition: DataMapFactoryTest.php:534
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithOppositeManyToManyRelationOfTypeSelect
‪columnMapIsInitializedWithOppositeManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:292
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithFieldEvaluationsForDateTimeFields
‪columnMapIsInitializedWithFieldEvaluationsForDateTimeFields($type, $expectedValue)
Definition: DataMapFactoryTest.php:407
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationOfTypeSelect
‪columnMapIsInitializedWithManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:265
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap
Definition: ColumnMap.php:28
‪TYPO3\CMS\Core\DataHandling\TableColumnType\USER
‪const USER
Definition: TableColumnType.php:38
‪TYPO3\CMS\Core\DataHandling\TableColumnType\PASSTHROUGH
‪const PASSTHROUGH
Definition: TableColumnType.php:37
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY
‪const RELATION_HAS_AND_BELONGS_TO_MANY
Definition: ColumnMap.php:52
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\buildDataMapFetchesSubclassesRecursively
‪buildDataMapFetchesSubclassesRecursively()
Definition: DataMapFactoryTest.php:456
‪TYPO3\CMS\Core\DataHandling\TableColumnType\RADIO
‪const RADIO
Definition: TableColumnType.php:33
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper
Definition: DataMapFactoryTest.php:16
‪TYPO3\CMS\Core\DataHandling\TableColumnType\TEXT
‪const TEXT
Definition: TableColumnType.php:31
‪TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidClassException
Definition: InvalidClassException.php:26
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsSelectRenderTypeSingleAsNonRelational
‪setRelationsDetectsSelectRenderTypeSingleAsNonRelational()
Definition: DataMapFactoryTest.php:160
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsTypeGroupAndRelationManyToMany
‪setRelationsDetectsTypeGroupAndRelationManyToMany($maxitems, $relation)
Definition: DataMapFactoryTest.php:199
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory
Definition: DataMapFactory.php:42
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:31
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManager
Definition: ConfigurationManager.php:33
‪TYPO3\CMS\Core\DataHandling\TableColumnType\SLUG
‪const SLUG
Definition: TableColumnType.php:42
‪TYPO3\CMS\Core\DataHandling\TableColumnType\CHECK
‪const CHECK
Definition: TableColumnType.php:32
‪TYPO3\CMS\Core\DataHandling\TableColumnSubType\FOLDER
‪const FOLDER
Definition: TableColumnSubType.php:33
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsOneToOneRelationWithIntermediateTable
‪setRelationsDetectsOneToOneRelationWithIntermediateTable()
Definition: DataMapFactoryTest.php:119
‪TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
Definition: VariableFrontend.php:25
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\tcaConfigurationsContainingTypeAndInternalType
‪array tcaConfigurationsContainingTypeAndInternalType()
Definition: DataMapFactoryTest.php:557
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\resolveTableNameReturnsExpectedTablenames
‪resolveTableNameReturnsExpectedTablenames($className, $expected)
Definition: DataMapFactoryTest.php:525
‪TYPO3\CMS\Core\DataHandling\TableColumnType\NONE
‪const NONE
Definition: TableColumnType.php:36
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\buildDataMapThrowsExceptionIfClassNameIsNotKnown
‪buildDataMapThrowsExceptionIfClassNameIsNotKnown()
Definition: DataMapFactoryTest.php:439
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationWithPidColumn
‪columnMapIsInitializedWithManyToManyRelationWithPidColumn()
Definition: DataMapFactoryTest.php:369
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsManyToManyRelationOfTypeInlineWithIntermediateTable
‪setRelationsDetectsManyToManyRelationOfTypeInlineWithIntermediateTable()
Definition: DataMapFactoryTest.php:245
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsOneToManyRelation
‪setRelationsDetectsOneToManyRelation()
Definition: DataMapFactoryTest.php:139
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsManyToManyRelationOfTypeSelect
‪setRelationsDetectsManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:225
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationWithoutPidColumn
‪columnMapIsInitializedWithManyToManyRelationWithoutPidColumn()
Definition: DataMapFactoryTest.php:347
‪TYPO3\CMS\Belog\Domain\Model\LogEntry
Definition: LogEntry.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\settingOneToManyRelationSetsRelationTableMatchFields
‪settingOneToManyRelationSetsRelationTableMatchFields()
Definition: DataMapFactoryTest.php:96
‪TYPO3\CMS\Core\DataHandling\TableColumnSubType
Definition: TableColumnSubType.php:24
‪TYPO3\CMS\Extbase\Domain\Model\FrontendUser
Definition: FrontendUser.php:25
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\oneToOneRelation
‪array oneToOneRelation()
Definition: DataMapFactoryTest.php:41
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnConfigurationIsInitializedWithMaxItemsEvaluationForTypeGroupDataProvider
‪array columnConfigurationIsInitializedWithMaxItemsEvaluationForTypeGroupDataProvider()
Definition: DataMapFactoryTest.php:185
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationOfTypeInlineAndIntermediateTable
‪columnMapIsInitializedWithManyToManyRelationOfTypeInlineAndIntermediateTable()
Definition: DataMapFactoryTest.php:320
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsOneToOneRelation
‪setRelationsDetectsOneToOneRelation($className)
Definition: DataMapFactoryTest.php:53
‪TYPO3\CMS\Core\DataHandling\TableColumnType\INPUT
‪const INPUT
Definition: TableColumnType.php:30
‪TYPO3\CMS\Core\DataHandling\TableColumnType
Definition: TableColumnType.php:24
‪TYPO3\CMS\Core\DataHandling\TableColumnType\FLEX
‪const FLEX
Definition: TableColumnType.php:39