‪TYPO3CMS  11.5
TcaRecordTitleTest.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 
20 use Prophecy\Argument;
21 use Prophecy\PhpUnit\ProphecyTrait;
24 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
25 
26 class ‪TcaRecordTitleTest extends UnitTestCase
27 {
28  use ProphecyTrait;
29 
30  protected string ‪$timeZone;
31 
32  public function ‪setUp(): void
33  {
34  parent::setUp();
35  $this->timeZone = date_default_timezone_get();
36  date_default_timezone_set('UTC');
37  }
38 
39  protected function ‪tearDown(): void
40  {
41  date_default_timezone_set($this->timeZone);
42  parent::tearDown();
43  }
44 
48  public function ‪addDataThrowsExceptionWithMissingLabel(): void
49  {
50  $input = [
51  'tableName' => 'aTable',
52  'databaseRew' => [],
53  'processedTca' => [
54  'ctrl' => [],
55  ],
56  ];
57  $this->expectException(\UnexpectedValueException::class);
58  $this->expectExceptionCode(1443706103);
59  (new ‪TcaRecordTitle())->addData($input);
60  }
61 
66  {
67  $input = [
68  'tableName' => 'aTable',
69  'databaseRow' => [],
70  'isInlineChild' => false,
71  'processedTca' => [
72  'ctrl' => [
73  'label' => 'uid',
74  'label_userFunc' => static function (&$parameters) {
75  $parameters['title'] = 'Test';
76  },
77  ],
78  'columns' => [],
79  ],
80  ];
81 
82  $expected = $input;
83  $expected['recordTitle'] = 'Test';
84 
85  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
86  }
87 
92  {
93  $input = [
94  'tableName' => 'aTable',
95  'databaseRow' => [
96  'uid' => 5,
97  ],
98  'isInlineChild' => true,
99  'isOnSymmetricSide' => false,
100  'inlineParentConfig' => [
101  'foreign_label' => 'aField',
102  ],
103  'processedTca' => [
104  'ctrl' => [
105  'label' => 'uid',
106  'formattedLabel_userFunc' => static function (&$parameters) {
107  $parameters['title'] = 'Test';
108  },
109  ],
110  'columns' => [],
111  ],
112  ];
113 
114  $expected = $input;
115  $expected['recordTitle'] = 'Test';
116 
117  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
118  }
119 
124  {
125  $input = [
126  'tableName' => 'aTable',
127  'databaseRow' => [
128  'aField' => 'aValue',
129  ],
130  'processedTca' => [
131  'ctrl' => [
132  'label' => 'foo',
133  'label_userFunc' => static function (&$parameters) {
134  $parameters['title'] = 'Value that MUST NOT be used, otherwise the code is broken.';
135  },
136  ],
137  'columns' => [
138  'aField' => [
139  'config' => [
140  'type' => 'input',
141  ],
142  ],
143  ],
144  ],
145  'isInlineChild' => true,
146  'isOnSymmetricSide' => false,
147  'inlineParentConfig' => [
148  'foreign_label' => 'aField',
149  ],
150  ];
151  $expected = $input;
152  $expected['recordTitle'] = 'aValue';
153  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
154  }
155 
160  {
161  $input = [
162  'tableName' => 'aTable',
163  'databaseRow' => [
164  'uid' => 5,
165  'aField' => 'aValue',
166  ],
167  'processedTca' => [
168  'ctrl' => [
169  'label' => 'foo',
170  'formattedLabel_userFunc' => static function (&$parameters) {
171  $parameters['title'] = 'aFormattedLabel';
172  },
173  ],
174  'columns' => [
175  'aField' => [
176  'config' => [
177  'type' => 'input',
178  ],
179  ],
180  ],
181  ],
182  'isInlineChild' => true,
183  'isOnSymmetricSide' => false,
184  'inlineParentConfig' => [
185  'foreign_label' => 'aField',
186  ],
187  ];
188  $expected = $input;
189  $expected['recordTitle'] = 'aFormattedLabel';
190  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
191  }
192 
197  {
198  $input = [
199  'tableName' => 'aTable',
200  'databaseRow' => [
201  'aField' => 'aValue',
202  ],
203  'processedTca' => [
204  'ctrl' => [
205  'label' => 'foo',
206  ],
207  'columns' => [
208  'aField' => [
209  'config' => [
210  'type' => 'input',
211  ],
212  ],
213  ],
214  ],
215  'isInlineChild' => true,
216  'inlineParentConfig' => [
217  'symmetric_label' => 'aField',
218  ],
219  'isOnSymmetricSide' => true,
220  ];
221  $expected = $input;
222  $expected['recordTitle'] = 'aValue';
223  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
224  }
225 
229  public function ‪addDataReturnsRecordTitleForUid(): void
230  {
231  $input = [
232  'tableName' => 'aTable',
233  'isInlineChild' => false,
234  'databaseRow' => [
235  'uid' => 'NEW56017ee37d10e587251374',
236  ],
237  'processedTca' => [
238  'ctrl' => [
239  'label' => 'uid',
240  ],
241  'columns' => [],
242  ],
243  ];
244 
245  $languageService = $this->prophesize(LanguageService::class);
246  ‪$GLOBALS['LANG'] = $languageService->reveal();
247  $languageService->sL(Argument::cetera())->willReturnArgument(0);
248 
249  $expected = $input;
250  $expected['recordTitle'] = 'NEW56017ee37d10e587251374';
251  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
252  }
253 
262  {
263  return [
264  'new record' => [
265  [
266  'type' => 'input',
267  ],
268  '',
269  '',
270  ],
271  'plain text input' => [
272  [
273  'type' => 'input',
274  ],
275  'aValue',
276  'aValue',
277  ],
278  'date input' => [
279  [
280  'type' => 'input',
281  'eval' => 'date',
282  ],
283  '978307261',
284  '01-01-01 (-7 days)',
285  ],
286  'date input (dbType: date)' => [
287  [
288  'type' => 'input',
289  'eval' => 'date',
290  'dbType' => 'date',
291  ],
292  '2001-01-01',
293  '01-01-01 (-7 days)',
294  ],
295  'date input (disableAgeDisplay: TRUE)' => [
296  [
297  'type' => 'input',
298  'eval' => 'date',
299  'disableAgeDisplay' => true,
300  ],
301  '978307261',
302  '01-01-01',
303  ],
304  'time input' => [
305  [
306  'type' => 'input',
307  'eval' => 'time',
308  ],
309  '44100',
310  '12:15',
311  ],
312  'time input (dbType: time)' => [
313  [
314  'type' => 'input',
315  'eval' => 'time',
316  'dbType' => 'time',
317  ],
318  '23:59:00',
319  '23:59',
320  ],
321  'timesec input' => [
322  [
323  'type' => 'input',
324  'eval' => 'timesec',
325  ],
326  '44130',
327  '12:15:30',
328  ],
329  'timesec input (dbType: time)' => [
330  [
331  'type' => 'input',
332  'eval' => 'timesec',
333  'dbType' => 'time',
334  ],
335  '23:59:59',
336  '23:59:59',
337  ],
338  'datetime input' => [
339  [
340  'type' => 'input',
341  'eval' => 'datetime',
342  'dbType' => 'date',
343  ],
344  '978307261',
345  '01-01-01 00:01',
346  ],
347  'datetime input (dbType: datetime)' => [
348  [
349  'type' => 'input',
350  'eval' => 'datetime',
351  'dbType' => 'datetime',
352  ],
353  '2014-12-31 23:59:59',
354  '31-12-14 23:59',
355  ],
356  ];
357  }
358 
363  public function ‪addDataReturnsRecordTitleForInputType(array $fieldConfig, string $fieldValue, string $expectedTitle): void
364  {
365  $input = [
366  'tableName' => 'aTable',
367  'isInlineChild' => false,
368  'databaseRow' => [
369  'uid' => '1',
370  'aField' => $fieldValue,
371  ],
372  'processedTca' => [
373  'ctrl' => [
374  'label' => 'aField',
375  ],
376  'columns' => [
377  'aField' => [
378  'config' => $fieldConfig,
379  ],
380  ],
381  ],
382  ];
383 
384  $languageService = $this->prophesize(LanguageService::class);
385  ‪$GLOBALS['LANG'] = $languageService->reveal();
386  $languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.minutesHoursDaysYears')
387  ->willReturn(' min| hrs| days| yrs| min| hour| day| year');
388  $languageService->sL(Argument::cetera())->willReturnArgument(0);
389  ‪$GLOBALS['EXEC_TIME'] = 978912061;
390 
391  $expected = $input;
392  $expected['recordTitle'] = $expectedTitle;
393  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
394  }
395 
400  {
401  $input = [
402  'tableName' => 'aTable',
403  'isInlineChild' => false,
404  'databaseRow' => [
405  'uid' => '1',
406  'aField' => '',
407  'anotherField' => 'anotherValue',
408  ],
409  'processedTca' => [
410  'ctrl' => [
411  'label' => 'aField',
412  'label_alt' => 'anotherField',
413  ],
414  'columns' => [
415  'aField' => [
416  'config' => [
417  'type' => 'input',
418  ],
419  ],
420  'anotherField' => [
421  'config' => [
422  'type' => 'input',
423  ],
424  ],
425  ],
426  ],
427  ];
428 
429  $expected = $input;
430  $expected['recordTitle'] = 'anotherValue';
431  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
432  }
433 
438  {
439  $input = [
440  'tableName' => 'aTable',
441  'isInlineChild' => false,
442  'databaseRow' => [
443  'uid' => '1',
444  'aField' => '',
445  'anotherField' => '',
446  'additionalField' => 'additionalValue',
447  ],
448  'processedTca' => [
449  'ctrl' => [
450  'label' => 'aField',
451  'label_alt' => 'anotherField,additionalField',
452  ],
453  'columns' => [
454  'aField' => [
455  'config' => [
456  'type' => 'input',
457  ],
458  ],
459  'anotherField' => [
460  'config' => [
461  'type' => 'input',
462  ],
463  ],
464  'additionalField' => [
465  'config' => [
466  'type' => 'input',
467  ],
468  ],
469  ],
470  ],
471  ];
472 
473  $expected = $input;
474  $expected['recordTitle'] = 'additionalValue';
475  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
476  }
477 
482  {
483  $input = [
484  'tableName' => 'aTable',
485  'isInlineChild' => false,
486  'databaseRow' => [
487  'uid' => '1',
488  'aField' => 'aField',
489  'anotherField' => 'anotherField',
490  ],
491  'processedTca' => [
492  'ctrl' => [
493  'label' => 'aField',
494  'label_alt' => 'anotherField',
495  'label_alt_force' => true,
496  ],
497  'columns' => [
498  'aField' => [
499  'config' => [
500  'type' => 'input',
501  ],
502  ],
503  'anotherField' => [
504  'config' => [
505  'type' => 'input',
506  ],
507  ],
508  ],
509  ],
510  ];
511 
512  $expected = $input;
513  $expected['recordTitle'] = 'aField, anotherField';
514  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
515  }
516 
521  {
522  $input = [
523  'tableName' => 'aTable',
524  'isInlineChild' => false,
525  'databaseRow' => [
526  'uid' => '1',
527  'aField' => 'aField',
528  'anotherField' => 'anotherField',
529  'additionalField' => 'additionalValue',
530  ],
531  'processedTca' => [
532  'ctrl' => [
533  'label' => 'aField',
534  'label_alt' => 'anotherField,additionalField',
535  'label_alt_force' => true,
536  ],
537  'columns' => [
538  'aField' => [
539  'config' => [
540  'type' => 'input',
541  ],
542  ],
543  'anotherField' => [
544  'config' => [
545  'type' => 'input',
546  ],
547  ],
548  'additionalField' => [
549  'config' => [
550  'type' => 'input',
551  ],
552  ],
553  ],
554  ],
555  ];
556 
557  $expected = $input;
558  $expected['recordTitle'] = 'aField, anotherField, additionalValue';
559  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
560  }
561 
566  {
567  $input = [
568  'tableName' => 'aTable',
569  'isInlineChild' => false,
570  'databaseRow' => [
571  'uid' => '1',
572  'aField' => 'aField',
573  'anotherField' => '',
574  'additionalField' => 'additionalValue',
575  ],
576  'processedTca' => [
577  'ctrl' => [
578  'label' => 'aField',
579  'label_alt' => 'anotherField,additionalField',
580  'label_alt_force' => true,
581  ],
582  'columns' => [
583  'aField' => [
584  'config' => [
585  'type' => 'input',
586  ],
587  ],
588  'anotherField' => [
589  'config' => [
590  'type' => 'input',
591  ],
592  ],
593  'additionalField' => [
594  'config' => [
595  'type' => 'input',
596  ],
597  ],
598  ],
599  ],
600  ];
601 
602  $expected = $input;
603  $expected['recordTitle'] = 'aField, additionalValue';
604  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
605  }
606 
610  public function ‪addDataReturnsRecordTitleForRadioType(): void
611  {
612  $input = [
613  'tableName' => 'aTable',
614  'isInlineChild' => false,
615  'databaseRow' => [
616  'uid' => '1',
617  'aField' => '2',
618  ],
619  'processedTca' => [
620  'ctrl' => [
621  'label' => 'aField',
622  ],
623  'columns' => [
624  'aField' => [
625  'config' => [
626  'type' => 'radio',
627  'items' => [
628  ['foo', 1],
629  ['bar', 2],
630  ['baz', 3],
631  ],
632  ],
633  ],
634  ],
635  ],
636  ];
637 
638  $expected = $input;
639  $expected['recordTitle'] = 'bar';
640  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
641  }
642 
646  public function ‪addDataReturnsRecordTitleForInlineType(): void
647  {
648  $input = [
649  'tableName' => 'aTable',
650  'isInlineChild' => false,
651  'databaseRow' => [
652  'uid' => '1',
653  'aField' => '2',
654  ],
655  'processedTca' => [
656  'ctrl' => [
657  'label' => 'aField',
658  ],
659  'columns' => [
660  'aField' => [
661  'config' => [
662  'type' => 'inline',
663  ],
664  'children' => [
665  [
666  'recordTitle' => 'foo',
667  'vanillaUid' => 2,
668  ],
669  ],
670  ],
671  ],
672  ],
673  ];
674 
675  $expected = $input;
676  $expected['recordTitle'] = 'foo';
677  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
678  }
679 
688  {
689  return [
690  'new record' => [
691  [],
692  [],
693  '',
694  ],
695  'db, single table, single record' => [
696  [
697  'allowed' => 'aTable',
698  ],
699  [
700  [
701  'title' => 'aValue',
702  ],
703  ],
704  'aValue',
705  ],
706  'db, single table, multiple records' => [
707  [
708  'allowed' => 'aTable',
709  ],
710  [
711  [
712  'title' => 'aValue',
713  ],
714  [
715  'title' => 'anotherValue',
716  ],
717  ],
718  'aValue, anotherValue',
719  ],
720  'db, multiple tables, single record' => [
721  [
722  'allowed' => 'aTable,anotherTable',
723  ],
724  [
725  [
726  'uid' => 1,
727  'table' => 'anotherTable',
728  'title' => 'anotherValue',
729  ],
730  ],
731  'anotherValue',
732  ],
733  'db, multiple tables, multiple records' => [
734  [
735  'allowed' => 'aTable,anotherTable',
736  ],
737  [
738  [
739  'uid' => 1,
740  'table' => 'aTable',
741  'title' => 'aValue',
742  ],
743  [
744  'uid' => 2,
745  'table' => 'anotherTable',
746  'title' => 'anotherValue',
747  ],
748  ],
749  'aValue, anotherValue',
750  ],
751  ];
752  }
753 
758  public function ‪addDataReturnsRecordTitleForGroupType(array $fieldConfig, array $fieldValue, string $expectedTitle): void
759  {
760  $input = [
761  'tableName' => 'aTable',
762  'isInlineChild' => false,
763  'databaseRow' => [
764  'uid' => '1',
765  'aField' => $fieldValue,
766  ],
767  'processedTca' => [
768  'ctrl' => [
769  'label' => 'aField',
770  ],
771  'columns' => [
772  'aField' => [
773  'config' => array_merge(
774  [
775  'type' => 'group',
776  ],
777  $fieldConfig
778  ),
779  ],
780  ],
781  ],
782  ];
783 
784  $languageService = $this->prophesize(LanguageService::class);
785  ‪$GLOBALS['LANG'] = $languageService->reveal();
786  $languageService->sL(Argument::cetera())->willReturnArgument(0);
787 
788  $expected = $input;
789  $expected['recordTitle'] = $expectedTitle;
790  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
791  }
792 
796  public function ‪addDataReturnsRecordTitleForGroupTypeDb(): void
797  {
798  $input = [
799  'tableName' => 'aTable',
800  'isInlineChild' => false,
801  'databaseRow' => [
802  'uid' => '1',
803  'aField' => [
804  [
805  'uid' => 1,
806  'table' => 'aTable',
807  'title' => 'aValue',
808  ],
809  [
810  'uid' => 2,
811  'table' => 'anotherTable',
812  'title' => 'anotherValue',
813  ],
814  ],
815  ],
816  'processedTca' => [
817  'ctrl' => [
818  'label' => 'aField',
819  ],
820  'columns' => [
821  'aField' => [
822  'config' => [
823  'type' => 'group',
824  'allowed' => 'aTable,anotherTable',
825  ],
826  ],
827  ],
828  ],
829  ];
830 
831  $expected = $input;
832  $expected['recordTitle'] = 'aValue, anotherValue';
833  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
834  }
835 
840  {
841  $input = [
842  'tableName' => 'aTable',
843  'isInlineChild' => false,
844  'databaseRow' => [
845  'aField' => 1,
846  ],
847  'processedTca' => [
848  'ctrl' => [
849  'label' => 'aField',
850  ],
851  'columns' => [
852  'aField' => [
853  'config' => [
854  'type' => 'check',
855  ],
856  ],
857  ],
858  ],
859  ];
860 
861  $languageService = $this->prophesize(LanguageService::class);
862  ‪$GLOBALS['LANG'] = $languageService->reveal();
863  $languageService->sL(Argument::cetera())->willReturnArgument(0)->shouldBeCalled();
864 
865  $expected = $input;
866  $expected['recordTitle'] = 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:yes';
867  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
868  }
869 
874  {
875  $input = [
876  'tableName' => 'aTable',
877  'isInlineChild' => false,
878  'databaseRow' => [
879  'aField' => '5',
880  ],
881  'processedTca' => [
882  'ctrl' => [
883  'label' => 'aField',
884  ],
885  'columns' => [
886  'aField' => [
887  'config' => [
888  'type' => 'check',
889  'items' => [
890  ['foo', ''],
891  ['bar', ''],
892  ['baz', ''],
893  ],
894  ],
895  ],
896  ],
897  ],
898  ];
899 
900  $languageService = $this->prophesize(LanguageService::class);
901  ‪$GLOBALS['LANG'] = $languageService->reveal();
902  $languageService->sL(Argument::cetera())->willReturnArgument(0);
903 
904  $expected = $input;
905  $expected['recordTitle'] = 'foo, baz';
906  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
907  }
908 
912  public function ‪addDataReturnsEmptyRecordTitleForFlexType(): void
913  {
914  $input = [
915  'tableName' => 'aTable',
916  'isInlineChild' => false,
917  'databaseRow' => [
918  'aField' => [
919  'data' => [
920  'sDEF' => [
921  'lDEF' => [
922  'aFlexField' => [
923  'vDEF' => 'aFlexValue',
924  ],
925  ],
926  ],
927  ],
928  ],
929  ],
930  'processedTca' => [
931  'ctrl' => [
932  'label' => 'aField',
933  ],
934  'columns' => [
935  'aField' => [
936  'config' => [
937  'type' => 'flex',
938  'ds' => [
939  'sheets' => [
940  'sDEF' => [
941  'ROOT' => [
942  'type' => 'array',
943  'el' => [
944  'aFlexField' => [
945  'label' => 'Some input field',
946  'config' => [
947  'type' => 'input',
948  ],
949  ],
950  ],
951  ],
952  ],
953  ],
954  ],
955 
956  ],
957  ],
958  ],
959  ],
960  ];
961 
962  $expected = $input;
963  $expected['recordTitle'] = '';
964  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
965  }
966 
970  public function ‪addDataReturnsRecordTitleForSelectType(): void
971  {
972  $input = [
973  'tableName' => 'aTable',
974  'isInlineChild' => false,
975  'databaseRow' => [
976  'aField' => [
977  '1',
978  '2',
979  ],
980  ],
981  'processedTca' => [
982  'ctrl' => [
983  'label' => 'aField',
984  ],
985  'columns' => [
986  'aField' => [
987  'config' => [
988  'type' => 'select',
989  'items' => [
990  ['foo', 1, null, null],
991  ['bar', 2, null, null],
992  ['baz', 4, null, null],
993  ],
994  ],
995  ],
996  ],
997  ],
998  ];
999 
1000  $expected = $input;
1001  $expected['recordTitle'] = 'foo, bar';
1002  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
1003  }
1004 
1009  {
1010  $input = [
1011  'tableName' => 'aTable',
1012  'isInlineChild' => false,
1013  'databaseRow' => [
1014  'aField' => '<p> text </p>',
1015  ],
1016  'processedTca' => [
1017  'ctrl' => [
1018  'label' => 'aField',
1019  ],
1020  'columns' => [
1021  'aField' => [
1022  'config' => [
1023  'type' => 'text',
1024  ],
1025  ],
1026  ],
1027  ],
1028  ];
1029 
1030  $expected = $input;
1031  $expected['recordTitle'] = 'text';
1032  self::assertSame($expected, (new TcaRecordTitle())->addData($input));
1033  }
1034 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleWithForcedAlternativeLabel
‪addDataReturnsRecordTitleWithForcedAlternativeLabel()
Definition: TcaRecordTitleTest.php:480
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForInputTypeDataProvider
‪addDataReturnsRecordTitleForInputTypeDataProvider()
Definition: TcaRecordTitleTest.php:260
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForInlineChildWithForeignLabel
‪addDataReturnsRecordTitleForInlineChildWithForeignLabel()
Definition: TcaRecordTitleTest.php:122
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForInputType
‪addDataReturnsRecordTitleForInputType(array $fieldConfig, string $fieldValue, string $expectedTitle)
Definition: TcaRecordTitleTest.php:362
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsEmptyRecordTitleForFlexType
‪addDataReturnsEmptyRecordTitleForFlexType()
Definition: TcaRecordTitleTest.php:911
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleWithMultipleAlternativeLabels
‪addDataReturnsRecordTitleWithMultipleAlternativeLabels()
Definition: TcaRecordTitleTest.php:436
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForArrayCheckboxType
‪addDataReturnsRecordTitleForArrayCheckboxType()
Definition: TcaRecordTitleTest.php:872
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\setUp
‪setUp()
Definition: TcaRecordTitleTest.php:31
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataOverridesRecordTitleWithFormattedLabelUserFuncForInlineChildWithForeignLabel
‪addDataOverridesRecordTitleWithFormattedLabelUserFuncForInlineChildWithForeignLabel()
Definition: TcaRecordTitleTest.php:158
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForUid
‪addDataReturnsRecordTitleForUid()
Definition: TcaRecordTitleTest.php:228
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleWithMultipleForcedAlternativeLabels
‪addDataReturnsRecordTitleWithMultipleForcedAlternativeLabels()
Definition: TcaRecordTitleTest.php:519
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForRadioType
‪addDataReturnsRecordTitleForRadioType()
Definition: TcaRecordTitleTest.php:609
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForGroupTypeDataProvider
‪addDataReturnsRecordTitleForGroupTypeDataProvider()
Definition: TcaRecordTitleTest.php:686
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForInlineChildWithSymmetricLabel
‪addDataReturnsRecordTitleForInlineChildWithSymmetricLabel()
Definition: TcaRecordTitleTest.php:195
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsStrippedAndTrimmedValueForTextType
‪addDataReturnsStrippedAndTrimmedValueForTextType()
Definition: TcaRecordTitleTest.php:1007
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForInlineType
‪addDataReturnsRecordTitleForInlineType()
Definition: TcaRecordTitleTest.php:645
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleIgnoresEmptyAlternativeLabels
‪addDataReturnsRecordTitleIgnoresEmptyAlternativeLabels()
Definition: TcaRecordTitleTest.php:564
‪TYPO3\CMS\Backend\Form\FormDataProvider\TcaRecordTitle
Definition: TcaRecordTitle.php:31
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForGroupTypeDb
‪addDataReturnsRecordTitleForGroupTypeDb()
Definition: TcaRecordTitleTest.php:795
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForSelectType
‪addDataReturnsRecordTitleForSelectType()
Definition: TcaRecordTitleTest.php:969
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForGroupType
‪addDataReturnsRecordTitleForGroupType(array $fieldConfig, array $fieldValue, string $expectedTitle)
Definition: TcaRecordTitleTest.php:757
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForFormattedLabelUserFunction
‪addDataReturnsRecordTitleForFormattedLabelUserFunction()
Definition: TcaRecordTitleTest.php:90
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleWithAlternativeLabel
‪addDataReturnsRecordTitleWithAlternativeLabel()
Definition: TcaRecordTitleTest.php:398
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\tearDown
‪tearDown()
Definition: TcaRecordTitleTest.php:38
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\$timeZone
‪string $timeZone
Definition: TcaRecordTitleTest.php:29
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForLabelUserFunction
‪addDataReturnsRecordTitleForLabelUserFunction()
Definition: TcaRecordTitleTest.php:64
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataThrowsExceptionWithMissingLabel
‪addDataThrowsExceptionWithMissingLabel()
Definition: TcaRecordTitleTest.php:47
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider
Definition: DatabaseDefaultLanguagePageRowTest.php:18
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest\addDataReturnsRecordTitleForSingleCheckboxType
‪addDataReturnsRecordTitleForSingleCheckboxType()
Definition: TcaRecordTitleTest.php:838
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaRecordTitleTest
Definition: TcaRecordTitleTest.php:27