TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
filemetadata/Tests/Functional/Tca/FileMetadataVisibleFieldsTest.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Filemetadata\Tests\Unit\Tca;
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 
22 
24 {
25  protected $coreExtensionsToLoad = ['filemetadata'];
26 
27  protected static $fileMetadataFields = [
29  'sys_language_uid',
30  'title',
31  'description',
32  'ranking',
33  'keywords',
34  'caption',
35  'download_name',
36  'visible',
37  'status',
38  'fe_groups',
39  'creator',
40  'creator_tool',
41  'publisher',
42  'source',
43  'copyright',
44  'location_country',
45  'location_region',
46  'location_city',
47  'categories',
48  ],
50  'sys_language_uid',
51  'title',
52  'description',
53  'ranking',
54  'keywords',
55  'caption',
56  'download_name',
57  'visible',
58  'status',
59  'fe_groups',
60  'creator',
61  'creator_tool',
62  'publisher',
63  'source',
64  'copyright',
65  'language',
66  'location_country',
67  'location_region',
68  'location_city',
69  'categories',
70  ],
72  'sys_language_uid',
73  'title',
74  'description',
75  'ranking',
76  'keywords',
77  'alternative',
78  'caption',
79  'download_name',
80  'visible',
81  'status',
82  'fe_groups',
83  'creator',
84  'creator_tool',
85  'publisher',
86  'source',
87  'copyright',
88  'language',
89  'location_country',
90  'location_region',
91  'location_city',
92  'latitude',
93  'longitude',
94  'content_creation_date',
95  'content_modification_date',
96  'categories',
97  ],
99  'sys_language_uid',
100  'title',
101  'description',
102  'ranking',
103  'keywords',
104  'caption',
105  'download_name',
106  'visible',
107  'status',
108  'fe_groups',
109  'creator',
110  'creator_tool',
111  'publisher',
112  'source',
113  'copyright',
114  'language',
115  'content_creation_date',
116  'content_modification_date',
117  'duration',
118  'categories',
119  ],
121  'sys_language_uid',
122  'title',
123  'description',
124  'ranking',
125  'keywords',
126  'caption',
127  'download_name',
128  'visible',
129  'status',
130  'fe_groups',
131  'creator',
132  'creator_tool',
133  'publisher',
134  'source',
135  'copyright',
136  'language',
137  'content_creation_date',
138  'content_modification_date',
139  'duration',
140  'categories',
141  ],
142  ];
143 
148  {
149  $this->setUpBackendUserFromFixture(1);
150  $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
151  $GLOBALS['TCA']['sys_file_metadata']['ctrl']['type'] = 'fileype';
152 
153  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
154 
155  foreach (static::$fileMetadataFields as $filetype => $expectedFields) {
156  $formResult = $formEngineTestService->createNewRecordForm(
157  'sys_file_metadata',
158  ['fileype' => $filetype]
159  );
160 
161  foreach ($expectedFields as $expectedField) {
162  $this->assertNotFalse(
163  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
164  'The field ' . $expectedField . ' is not in the form HTML for file type ' . $filetype
165  );
166  }
167  }
168  }
169 }
if(TYPO3_MODE=== 'BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']
static makeInstance($className,...$constructorArguments)