20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 $completeConfiguration = [
37 'default.' => [
'readAction' =>
'1'],
38 '1.' => [
'writeAction' =>
'1'],
39 '0.' => [
'readAction' =>
'0'],
45 $GLOBALS[
'BE_USER'] = $this->createMock(BackendUserAuthentication::class);
46 $GLOBALS[
'BE_USER']->expects($this->at(0))->method(
'getTSConfig')->will($this->returnValue($completeConfiguration));
47 $GLOBALS[
'BE_USER']->expects($this->at(1))->method(
'getTSConfig')->will($this->returnValue([
'value' =>
null,
'properties' =>
null]));
68 'non-existant table' => [
74 'Doktype=1: one simple field' => [
87 'origString' =>
'title'
91 'non-existant type given: Return for type 1' => [
104 'origString' =>
'title'
108 'Doktype=1: one simple field, useFieldNameAsKey=true' => [
121 'origString' =>
'title'
125 'Empty showitem Field' => [
142 'RTE field within a palette' => [
151 'field' =>
'--div--',
152 'title' =>
'General',
155 'origString' =>
'--div--;General'
158 'field' =>
'--palette--',
159 'title' =>
'Palette',
162 'origString' =>
'--palette--;Palette;123'
169 'origString' =>
'title'
176 'origString' =>
'text'
180 'title' =>
'Select field',
183 'origString' =>
'select;Select field'
187 'RTE field with more settings within a palette' => [
196 'field' =>
'--div--',
197 'title' =>
'General',
200 'origString' =>
'--div--;General'
203 'field' =>
'--palette--',
204 'title' =>
'RTE palette',
207 'origString' =>
'--palette--;RTE palette;456'
214 'origString' =>
'text2'
239 'label' =>
'Title test',
245 'label' =>
'RTE Text',
253 'label' =>
'RTE Text 2',
261 'label' =>
'Select test',
264 [
'Please select', 0],
270 'renderType' =>
'selectSingle'
275 'showitem' =>
'title'
278 'showitem' =>
'--div--;General,--palette--;RTE palette;456'
281 'showitem' =>
'--div--;General,--palette--;Palette;123,title'
284 'showitem' =>
'--div--;General,title'
289 'showitem' =>
'text,select;Select field'
292 'showitem' =>
'text2'
301 '99' => [
'showitem' =>
'']
307 $this->assertSame($expected, $return);