‪TYPO3CMS  11.5
DataMapFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
30 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
31 
35 class ‪DataMapFactoryTest extends UnitTestCase
36 {
40  public function ‪oneToOneRelation(): array
41  {
42  return [
43  ['Tx_Myext_Domain_Model_Foo'],
44  [Administrator::class],
45  ];
46  }
47 
52  public function ‪setRelationsDetectsOneToOneRelation($className): void
53  {
54  $mockColumnMap = $this->createMock(ColumnMap::class);
55  $columnConfiguration = [
56  'type' => 'select',
57  'foreign_table' => 'tx_myextension_bar',
58  'foreign_field' => 'parentid',
59  ];
60  $type = $className;
61  $elementType = null;
62  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
63  $mockDataMapFactory->expects(self::once())->method('setOneToOneRelation')->willReturn($mockColumnMap);
64  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
65  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
66  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
67  }
68 
73  {
74  $mockColumnMap = $this->createMock(ColumnMap::class);
75  $matchFields = [
76  'fieldname' => 'foo_model',
77  ];
78  $columnConfiguration = [
79  'type' => 'select',
80  'foreign_table' => 'tx_myextension_bar',
81  'foreign_field' => 'parentid',
82  'foreign_match_fields' => $matchFields,
83  ];
84 
85  $mockColumnMap->expects(self::once())
86  ->method('setRelationTableMatchFields')
87  ->with($matchFields);
88  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
89  $mockDataMapFactory->_call('setOneToOneRelation', $mockColumnMap, $columnConfiguration);
90  }
91 
96  {
97  $mockColumnMap = $this->createMock(ColumnMap::class);
98  $matchFields = [
99  'fieldname' => 'foo_model',
100  ];
101  $columnConfiguration = [
102  'type' => 'select',
103  'foreign_table' => 'tx_myextension_bar',
104  'foreign_field' => 'parentid',
105  'foreign_match_fields' => $matchFields,
106  ];
107 
108  $mockColumnMap->expects(self::once())
109  ->method('setRelationTableMatchFields')
110  ->with($matchFields);
111  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
112  $mockDataMapFactory->_call('setOneToManyRelation', $mockColumnMap, $columnConfiguration);
113  }
114 
119  {
120  $mockColumnMap = $this->createMock(ColumnMap::class);
121  $columnConfiguration = [
122  'type' => 'select',
123  'foreign_table' => 'tx_myextension_bar',
124  'MM' => 'tx_myextension_mm',
125  ];
126  $type = 'Tx_Myext_Domain_Model_Foo';
127  $elementType = null;
128  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
129  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
130  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
131  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
132  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
133  }
134 
139  {
140  $mockColumnMap = $this->createMock(ColumnMap::class);
141  $columnConfiguration = [
142  'type' => 'select',
143  'foreign_table' => 'tx_myextension_bar',
144  'foreign_field' => 'parentid',
145  'foreign_table_field' => 'parenttable',
146  ];
147  $type = ObjectStorage::class;
148  $elementType = 'Tx_Myext_Domain_Model_Foo';
149  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
150  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
151  $mockDataMapFactory->expects(self::once())->method('setOneToManyRelation')->willReturn($mockColumnMap);
152  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
153  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
154  }
155 
160  {
161  $columnMap = new ‪ColumnMap('foo', 'foo');
162  $columnConfiguration = [
163  'type' => 'select',
164  'renderType' => 'selectSingle',
165  'items' => [
166  ['One', 1],
167  ['Two', 2],
168  ['Three', 3],
169  ],
170  ];
171  $type = null;
172  $elementType = null;
173  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
174  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
175  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
176  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
177  $actualColumnMap = $mockDataMapFactory->_call('setRelations', $columnMap, $columnConfiguration, $type, $elementType);
178  self::assertSame($columnMap::RELATION_NONE, $actualColumnMap->getTypeOfRelation());
179  }
180 
185  {
186  return [
187  'maxitems not set' => ['', 'RELATION_HAS_MANY'],
188  'maxitems equals 1' => ['1', 'RELATION_NONE'],
189  'maxitems higher than 1' => ['10', 'RELATION_HAS_MANY'],
190  ];
191  }
192 
198  public function ‪setRelationsDetectsTypeGroupAndRelationManyToMany($maxitems, $relation): void
199  {
200  $columnMap = new ‪ColumnMap('foo', 'foo');
201  if (empty($maxitems)) {
202  $columnConfiguration = [
203  'type' => 'group',
204  ];
205  } else {
206  $columnConfiguration = [
207  'type' => 'group',
208  'maxitems' => $maxitems,
209  ];
210  }
211  $type = null;
212  $elementType = null;
213  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
214  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
215  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
216  $mockDataMapFactory->expects(self::never())->method('setManyToManyRelation');
217  $actualColumnMap = $mockDataMapFactory->_call('setRelations', $columnMap, $columnConfiguration, $type, $elementType);
218  self::assertSame($relation, $actualColumnMap->getTypeOfRelation());
219  }
220 
225  {
226  $mockColumnMap = $this->createMock(ColumnMap::class);
227  $columnConfiguration = [
228  'type' => 'select',
229  'foreign_table' => 'tx_myextension_bar',
230  'MM' => 'tx_myextension_mm',
231  ];
232  $type = ObjectStorage::class;
233  $elementType = 'Tx_Myext_Domain_Model_Foo';
234  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
235  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
236  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
237  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
238  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
239  }
240 
245  {
246  $mockColumnMap = $this->createMock(ColumnMap::class);
247  $columnConfiguration = [
248  'type' => 'inline',
249  'foreign_table' => 'tx_myextension_righttable',
250  'MM' => 'tx_myextension_mm',
251  ];
252  $type = ObjectStorage::class;
253  $elementType = 'Tx_Myext_Domain_Model_Foo';
254  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'], [], '', false);
255  $mockDataMapFactory->expects(self::never())->method('setOneToOneRelation');
256  $mockDataMapFactory->expects(self::never())->method('setOneToManyRelation');
257  $mockDataMapFactory->expects(self::once())->method('setManyToManyRelation')->willReturn($mockColumnMap);
258  $mockDataMapFactory->_call('setRelations', $mockColumnMap, $columnConfiguration, $type, $elementType);
259  }
260 
265  {
266  $leftColumnsDefinition = [
267  'rights' => [
268  'type' => 'select',
269  'foreign_table' => 'tx_myextension_righttable',
270  'foreign_table_where' => 'WHERE 1=1',
271  'MM' => 'tx_myextension_mm',
272  'MM_table_where' => 'WHERE 2=2',
273  ],
274  ];
275  $mockColumnMap = $this->createMock(ColumnMap::class);
276  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
277  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
278  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_righttable'));
279  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting'));
280  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_local'));
281  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
282  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
283  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
284  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
285  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
286  }
287 
292  {
293  $rightColumnsDefinition = [
294  'lefts' => [
295  'type' => 'select',
296  'foreign_table' => 'tx_myextension_lefttable',
297  'MM' => 'tx_myextension_mm',
298  'MM_opposite_field' => 'rights',
299  ],
300  ];
301 
302  $mockColumnMap = $this->createMock(ColumnMap::class);
303  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
304  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
305  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_lefttable'));
306  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting_foreign'));
307  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_foreign'));
308  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
309  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
310  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
311  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
312  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $rightColumnsDefinition['lefts']);
313  }
314 
319  {
320  $leftColumnsDefinition = [
321  'rights' => [
322  'type' => 'inline',
323  'foreign_table' => 'tx_myextension_righttable',
324  'MM' => 'tx_myextension_mm',
325  'foreign_sortby' => 'sorting',
326  ],
327  ];
328  $mockColumnMap = $this->createMock(ColumnMap::class);
329  $mockColumnMap->expects(self::once())->method('setTypeOfRelation')->with(self::equalTo(‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
330  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
331  $mockColumnMap->expects(self::once())->method('setChildTableName')->with(self::equalTo('tx_myextension_righttable'));
332  $mockColumnMap->expects(self::once())->method('setChildSortByFieldName')->with(self::equalTo('sorting'));
333  $mockColumnMap->expects(self::once())->method('setParentKeyFieldName')->with(self::equalTo('uid_local'));
334  $mockColumnMap->expects(self::never())->method('setParentTableFieldName');
335  $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields');
336  $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields');
337  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getColumnsDefinition'], [], '', false);
338  $mockDataMapFactory->expects(self::never())->method('getColumnsDefinition');
339  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
340  }
341 
346  {
347  $leftColumnsDefinition = [
348  'rights' => [
349  'type' => 'select',
350  'foreign_table' => 'tx_myextension_righttable',
351  'foreign_table_where' => 'WHERE 1=1',
352  'MM' => 'tx_myextension_mm',
353  ],
354  ];
355  $mockColumnMap = $this->createMock(ColumnMap::class);
356  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
357  $mockColumnMap->expects(self::once())->method('getRelationTableName')->willReturn('tx_myextension_mm');
358  $mockColumnMap->expects(self::never())->method('setrelationTablePageIdColumnName');
359  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
360  $mockDataMapFactory->expects(self::once())->method('getControlSection')->with(self::equalTo('tx_myextension_mm'))->willReturn(null);
361  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
362  }
363 
368  {
369  $leftColumnsDefinition = [
370  'rights' => [
371  'type' => 'select',
372  'foreign_table' => 'tx_myextension_righttable',
373  'foreign_table_where' => 'WHERE 1=1',
374  'MM' => 'tx_myextension_mm',
375  ],
376  ];
377  $mockColumnMap = $this->createMock(ColumnMap::class);
378  $mockColumnMap->expects(self::once())->method('setRelationTableName')->with(self::equalTo('tx_myextension_mm'));
379  $mockColumnMap->expects(self::once())->method('getRelationTableName')->willReturn('tx_myextension_mm');
380  $mockColumnMap->expects(self::once())->method('setrelationTablePageIdColumnName')->with(self::equalTo('pid'));
381  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
382  $mockDataMapFactory->expects(self::once())->method('getControlSection')->with(self::equalTo('tx_myextension_mm'))->willReturn(['ctrl' => ['foo' => 'bar']]);
383  $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
384  }
385 
390  {
391  return [
392  'date field' => ['date', 'date'],
393  'datetime field' => ['datetime', 'datetime'],
394  'time field' => ['time', 'time'],
395  'no date/datetime/time field' => ['', null],
396  ];
397  }
398 
405  public function ‪columnMapIsInitializedWithFieldEvaluationsForDateTimeFields($type, $expectedValue): void
406  {
407  $columnDefinition = [
408  'type' => 'input',
409  'dbType' => $type,
410  'eval' => $type,
411  ];
412 
413  $mockColumnMap = $this->getMockBuilder(ColumnMap::class)
414  ->onlyMethods(['setDateTimeStorageFormat'])
415  ->disableOriginalConstructor()
416  ->getMock();
417 
418  if ($expectedValue !== null) {
419  $mockColumnMap->expects(self::once())->method('setDateTimeStorageFormat')->with(self::equalTo($type));
420  } else {
421  $mockColumnMap->expects(self::never())->method('setDateTimeStorageFormat');
422  }
423 
424  $accessibleDataMapFactory = $this->getAccessibleMock(
425  DataMapFactory::class,
426  ['dummy'],
427  [],
428  '',
429  false
430  );
431  $accessibleDataMapFactory->_call('setFieldEvaluations', $mockColumnMap, $columnDefinition);
432  }
433 
438  {
439  $this->expectException(InvalidClassException::class);
440  // @TODO expectExceptionCode is 0
441  $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['getControlSection'], [], '', false);
442  $cacheMock = $this->getMockBuilder(VariableFrontend::class)
443  ->onlyMethods(['get'])
444  ->disableOriginalConstructor()
445  ->getMock();
446  $cacheMock->method('get')->willReturn(false);
447  $mockDataMapFactory->_set('dataMapCache', $cacheMock);
448  $mockDataMapFactory->_set('baseCacheIdentifier', 'PackageDependentCacheIdentifier');
449  $mockDataMapFactory->buildDataMap('UnknownObject');
450  }
451 
455  public function ‪classNameTableNameMappings(): array
456  {
457  return [
458  'Core classes' => [LogEntry::class, 'tx_belog_domain_model_logentry'],
459  'Core classes with namespaces and leading backslash' => [LogEntry::class, 'tx_belog_domain_model_logentry'],
460  'Extension classes' => ['ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'],
461  'Extension classes with namespaces and leading backslash' => ['\\ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'],
462  ];
463  }
464 
469  public function ‪resolveTableNameReturnsExpectedTablenames($className, $expected): void
470  {
471  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
472  self::assertSame($expected, $dataMapFactory->_call('resolveTableName', $className));
473  }
474 
479  {
480  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
481 
482  $columnMap = $this->getMockBuilder(ColumnMap::class)
483  ->setConstructorArgs(['column', 'property'])
484  ->getMock();
485  GeneralUtility::addInstance(ColumnMap::class, $columnMap);
486 
487  self::assertEquals(
488  $columnMap,
489  $dataMapFactory->_call('createColumnMap', 'column', 'property')
490  );
491  }
492 
497  {
498  return [
499  [['type' => 'input'], ‪TableColumnType::INPUT, null],
500  [['type' => 'text'], ‪TableColumnType::TEXT, null],
501  [['type' => 'check'], ‪TableColumnType::CHECK, null],
502  [['type' => 'radio'], ‪TableColumnType::RADIO, null],
503  [['type' => 'select'], ‪TableColumnType::SELECT, null],
504  [['type' => 'category'], ‪TableColumnType::CATEGORY, null],
506  [['type' => 'group', 'internal_type' => 'folder'], ‪TableColumnType::GROUP, ‪TableColumnSubType::FOLDER],
507  [['type' => 'none'], ‪TableColumnType::NONE, null],
508  [['type' => 'language'], ‪TableColumnType::LANGUAGE, null],
509  [['type' => 'passthrough'], ‪TableColumnType::PASSTHROUGH, null],
510  [['type' => 'user'], ‪TableColumnType::USER, null],
511  [['type' => 'flex'], ‪TableColumnType::FLEX, null],
512  [['type' => 'inline'], ‪TableColumnType::INLINE, null],
513  [['type' => 'slug'], ‪TableColumnType::SLUG, null],
514  ];
515  }
516 
525  public function ‪setTypeDetectsTypeAndInternalTypeProperly(array $columnConfiguration, $type, $internalType): void
526  {
527  $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false);
528 
529  $columnMap = $this->getAccessibleMock(ColumnMap::class, ['dummy'], [], '', false);
530 
531  $dataMapFactory->_call('setType', $columnMap, $columnConfiguration);
532 
533  self::assertEquals($type, (string)$columnMap->getType());
534  self::assertEquals($internalType, (string)$columnMap->getInternalType());
535  }
536 }
‪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:41
‪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:455
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\settingOneToOneRelationSetsRelationTableMatchFields
‪settingOneToOneRelationSetsRelationTableMatchFields()
Definition: DataMapFactoryTest.php:72
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setTypeDetectsTypeAndInternalTypeProperly
‪setTypeDetectsTypeAndInternalTypeProperly(array $columnConfiguration, $type, $internalType)
Definition: DataMapFactoryTest.php:525
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest
Definition: DataMapFactoryTest.php:36
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithFieldEvaluationsForDateTimeFieldsDataProvider
‪array columnMapIsInitializedWithFieldEvaluationsForDateTimeFieldsDataProvider()
Definition: DataMapFactoryTest.php:389
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\createColumnMapReturnsAValidColumnMap
‪createColumnMapReturnsAValidColumnMap()
Definition: DataMapFactoryTest.php:478
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithOppositeManyToManyRelationOfTypeSelect
‪columnMapIsInitializedWithOppositeManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:291
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithFieldEvaluationsForDateTimeFields
‪columnMapIsInitializedWithFieldEvaluationsForDateTimeFields($type, $expectedValue)
Definition: DataMapFactoryTest.php:405
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationOfTypeSelect
‪columnMapIsInitializedWithManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:264
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap
Definition: ColumnMap.php:28
‪TYPO3\CMS\Core\DataHandling\TableColumnType\USER
‪const USER
Definition: TableColumnType.php:39
‪TYPO3\CMS\Core\DataHandling\TableColumnType\PASSTHROUGH
‪const PASSTHROUGH
Definition: TableColumnType.php:38
‪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\Core\DataHandling\TableColumnType\RADIO
‪const RADIO
Definition: TableColumnType.php:33
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper
Definition: DataMapFactoryTest.php:18
‪TYPO3\CMS\Core\DataHandling\TableColumnType\TEXT
‪const TEXT
Definition: TableColumnType.php:31
‪TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidClassException
Definition: InvalidClassException.php:25
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsSelectRenderTypeSingleAsNonRelational
‪setRelationsDetectsSelectRenderTypeSingleAsNonRelational()
Definition: DataMapFactoryTest.php:159
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:32
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsTypeGroupAndRelationManyToMany
‪setRelationsDetectsTypeGroupAndRelationManyToMany($maxitems, $relation)
Definition: DataMapFactoryTest.php:198
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory
Definition: DataMapFactory.php:39
‪ExtbaseTeam\BlogExample\Domain\Model\Administrator
Definition: Administrator.php:28
‪TYPO3\CMS\Core\DataHandling\TableColumnType\LANGUAGE
‪const LANGUAGE
Definition: TableColumnType.php:37
‪TYPO3\CMS\Core\DataHandling\TableColumnType\SLUG
‪const SLUG
Definition: TableColumnType.php:43
‪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:118
‪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:496
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\resolveTableNameReturnsExpectedTablenames
‪resolveTableNameReturnsExpectedTablenames($className, $expected)
Definition: DataMapFactoryTest.php:469
‪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:437
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationWithPidColumn
‪columnMapIsInitializedWithManyToManyRelationWithPidColumn()
Definition: DataMapFactoryTest.php:367
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsManyToManyRelationOfTypeInlineWithIntermediateTable
‪setRelationsDetectsManyToManyRelationOfTypeInlineWithIntermediateTable()
Definition: DataMapFactoryTest.php:244
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsOneToManyRelation
‪setRelationsDetectsOneToManyRelation()
Definition: DataMapFactoryTest.php:138
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsManyToManyRelationOfTypeSelect
‪setRelationsDetectsManyToManyRelationOfTypeSelect()
Definition: DataMapFactoryTest.php:224
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationWithoutPidColumn
‪columnMapIsInitializedWithManyToManyRelationWithoutPidColumn()
Definition: DataMapFactoryTest.php:345
‪TYPO3\CMS\Belog\Domain\Model\LogEntry
Definition: LogEntry.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\settingOneToManyRelationSetsRelationTableMatchFields
‪settingOneToManyRelationSetsRelationTableMatchFields()
Definition: DataMapFactoryTest.php:95
‪TYPO3\CMS\Core\DataHandling\TableColumnSubType
Definition: TableColumnSubType.php:24
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\oneToOneRelation
‪array oneToOneRelation()
Definition: DataMapFactoryTest.php:40
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnConfigurationIsInitializedWithMaxItemsEvaluationForTypeGroupDataProvider
‪array columnConfigurationIsInitializedWithMaxItemsEvaluationForTypeGroupDataProvider()
Definition: DataMapFactoryTest.php:184
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\columnMapIsInitializedWithManyToManyRelationOfTypeInlineAndIntermediateTable
‪columnMapIsInitializedWithManyToManyRelationOfTypeInlineAndIntermediateTable()
Definition: DataMapFactoryTest.php:318
‪TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\DataMapFactoryTest\setRelationsDetectsOneToOneRelation
‪setRelationsDetectsOneToOneRelation($className)
Definition: DataMapFactoryTest.php:52
‪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:40
‪TYPO3\CMS\Core\DataHandling\TableColumnType\CATEGORY
‪const CATEGORY
Definition: TableColumnType.php:44