‪TYPO3CMS  9.5
TcaColumnsProcessRecordTitleTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
19 
23 class ‪TcaColumnsProcessRecordTitleTest extends UnitTestCase
24 {
29  {
30  $input = [
31  'columnsToProcess' => [],
32  'isInlineChild' => false,
33  'processedTca' => [
34  'ctrl' => [
35  'label' => 'uid'
36  ],
37  'columns' => [],
38  ]
39  ];
40 
41  $expected = $input;
42  $expected['columnsToProcess'] = ['uid'];
43  $this->assertSame($expected, (new ‪TcaColumnsProcessRecordTitle)->addData($input));
44  }
45 
50  {
51  $input = [
52  'columnsToProcess' => [],
53  'isInlineChild' => false,
54  'processedTca' => [
55  'ctrl' => [
56  'label' => 'uid',
57  'label_alt' => 'aField,anotherField',
58  ],
59  'columns' => [],
60  ]
61  ];
62 
63  $expected = $input;
64  $expected['columnsToProcess'] = ['uid', 'aField', 'anotherField'];
65  $this->assertSame($expected, (new ‪TcaColumnsProcessRecordTitle)->addData($input));
66  }
67 
72  {
73  $input = [
74  'columnsToProcess' => [],
75  'inlineParentConfig' => [
76  'foreign_label' => 'aForeignLabelField',
77  ],
78  'isInlineChild' => true,
79  ];
80 
81  $expected = $input;
82  $expected['columnsToProcess'] = [ 'aForeignLabelField' ];
83  $this->assertSame($expected, (new ‪TcaColumnsProcessRecordTitle)->addData($input));
84  }
85 
90  {
91  $input = [
92  'columnsToProcess' => [],
93  'inlineParentConfig' => [
94  'symmetric_label' => 'aSymmetricLabelField',
95  ],
96  'isInlineChild' => true,
97  ];
98 
99  $expected = $input;
100  $expected['columnsToProcess'] = [ 'aSymmetricLabelField' ];
101  $this->assertSame($expected, (new ‪TcaColumnsProcessRecordTitle)->addData($input));
102  }
103 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersAlternativeLabelColumnn
‪addDataRegistersAlternativeLabelColumnn()
Definition: TcaColumnsProcessRecordTitleTest.php:49
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersSymmetricLabelInInlineContext
‪addDataRegistersSymmetricLabelInInlineContext()
Definition: TcaColumnsProcessRecordTitleTest.php:89
‪TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessRecordTitle
Definition: TcaColumnsProcessRecordTitle.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersLabelColumn
‪addDataRegistersLabelColumn()
Definition: TcaColumnsProcessRecordTitleTest.php:28
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest\addDataRegistersForeignLabelInInlineContext
‪addDataRegistersForeignLabelInInlineContext()
Definition: TcaColumnsProcessRecordTitleTest.php:71
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaColumnsProcessRecordTitleTest
Definition: TcaColumnsProcessRecordTitleTest.php:24
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider
Definition: DatabaseDefaultLanguagePageRowTest.php:3