‪TYPO3CMS  10.4
TcaColumnsProcessRecordTitleTest.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 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪TcaColumnsProcessRecordTitleTest extends UnitTestCase
25 {
30  {
31  $input = [
32  'columnsToProcess' => [],
33  'isInlineChild' => false,
34  'processedTca' => [
35  'ctrl' => [
36  'label' => 'uid'
37  ],
38  'columns' => [],
39  ]
40  ];
41 
42  $expected = $input;
43  $expected['columnsToProcess'] = ['uid'];
44  self::assertSame($expected, (new ‪TcaColumnsProcessRecordTitle())->addData($input));
45  }
46 
51  {
52  $input = [
53  'columnsToProcess' => [],
54  'isInlineChild' => false,
55  'processedTca' => [
56  'ctrl' => [
57  'label' => 'uid',
58  'label_alt' => 'aField,anotherField',
59  ],
60  'columns' => [],
61  ]
62  ];
63 
64  $expected = $input;
65  $expected['columnsToProcess'] = ['uid', 'aField', 'anotherField'];
66  self::assertSame($expected, (new ‪TcaColumnsProcessRecordTitle())->addData($input));
67  }
68 
73  {
74  $input = [
75  'columnsToProcess' => [],
76  'inlineParentConfig' => [
77  'foreign_label' => 'aForeignLabelField',
78  ],
79  'isInlineChild' => true,
80  ];
81 
82  $expected = $input;
83  $expected['columnsToProcess'] = [ 'aForeignLabelField' ];
84  self::assertSame($expected, (new ‪TcaColumnsProcessRecordTitle())->addData($input));
85  }
86 
91  {
92  $input = [
93  'columnsToProcess' => [],
94  'inlineParentConfig' => [
95  'symmetric_label' => 'aSymmetricLabelField',
96  ],
97  'isInlineChild' => true,
98  ];
99 
100  $expected = $input;
101  $expected['columnsToProcess'] = [ 'aSymmetricLabelField' ];
102  self::assertSame($expected, (new ‪TcaColumnsProcessRecordTitle())->addData($input));
103  }
104 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersAlternativeLabelColumn
‪addDataRegistersAlternativeLabelColumn()
Definition: TcaColumnsProcessRecordTitleTest.php:50
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersSymmetricLabelInInlineContext
‪addDataRegistersSymmetricLabelInInlineContext()
Definition: TcaColumnsProcessRecordTitleTest.php:90
‪TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessRecordTitle
Definition: TcaColumnsProcessRecordTitle.php:26
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersLabelColumn
‪addDataRegistersLabelColumn()
Definition: TcaColumnsProcessRecordTitleTest.php:29
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersForeignLabelInInlineContext
‪addDataRegistersForeignLabelInInlineContext()
Definition: TcaColumnsProcessRecordTitleTest.php:72
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest
Definition: TcaColumnsProcessRecordTitleTest.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider
Definition: DatabaseDefaultLanguagePageRowTest.php:18