‪TYPO3CMS  ‪main
AbstractActionTestCase.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 
21 
23 {
24  protected const ‪VALUE_PageId = 89;
25  protected const ‪VALUE_LanguageId = 1;
26  protected const ‪VALUE_ElementIdFirst = 1;
27 
28  protected const ‪TABLE_Element = 'tx_testflexsectioncontainer';
29  protected const ‪FIELD_Flex = 'flex_1';
30 
31  protected const ‪SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv';
32 
33  protected array ‪$testExtensionsToLoad = [
34  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_flex_section_container',
35  ];
36 
37  protected function ‪setUp(): void
38  {
39  parent::setUp();
40  $this->importCSVDataSet(static::SCENARIO_DataSet);
41  }
42 
43  public function ‪deleteSection(): void
44  {
45  $this->actionService->modifyRecord(
46  self::TABLE_Element,
47  self::VALUE_ElementIdFirst,
48  [
49  'flex_1' => [
50  'data' => [
51  'sSection' => [
52  'lDEF' => [
53  'section_1' => [
54  'el' => [
55  '62cd3f446f5bc303148445' => [
56  'container_1' => [
57  'el' => [
58  'input_1' => [
59  'vDEF' => 'section element 1',
60  ],
61  ],
62  ],
63  '_ACTION' => 'DELETE',
64  ],
65  '62cd3f480ef5e265844192' => [
66  'container_1' => [
67  'el' => [
68  'input_1' => [
69  'vDEF' => 'section element 2',
70  ],
71  ],
72  ],
73  '_ACTION' => '',
74  ],
75  ],
76  ],
77  ],
78  ],
79  ],
80  ],
81  ],
82  );
83  }
84 
85  public function ‪changeSorting(): void
86  {
87  $this->actionService->modifyRecord(
88  self::TABLE_Element,
89  self::VALUE_ElementIdFirst,
90  [
91  'flex_1' => [
92  'data' => [
93  'sSection' => [
94  'lDEF' => [
95  'section_1' => [
96  'el' => [
97  '62cd3f446f5bc303148445' => [
98  'container_1' => [
99  'el' => [
100  'input_1' => [
101  'vDEF' => 'section element 1',
102  ],
103  ],
104  ],
105  '_ACTION' => 1,
106  ],
107  '62cd3f480ef5e265844192' => [
108  'container_1' => [
109  'el' => [
110  'input_1' => [
111  'vDEF' => 'section element 2',
112  ],
113  ],
114  ],
115  '_ACTION' => 0,
116  ],
117  ],
118  ],
119  ],
120  ],
121  ],
122  ],
123  ],
124  );
125  }
126 }
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase
Definition: AbstractActionTestCase.php:23
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\setUp
‪setUp()
Definition: AbstractActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\changeSorting
‪changeSorting()
Definition: AbstractActionTestCase.php:85
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\FIELD_Flex
‪const FIELD_Flex
Definition: AbstractActionTestCase.php:29
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: AbstractActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\VALUE_ElementIdFirst
‪const VALUE_ElementIdFirst
Definition: AbstractActionTestCase.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\deleteSection
‪deleteSection()
Definition: AbstractActionTestCase.php:43
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\SCENARIO_DataSet
‪const SCENARIO_DataSet
Definition: AbstractActionTestCase.php:31
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\AbstractDataHandlerActionTestCase
Definition: AbstractDataHandlerActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\TABLE_Element
‪const TABLE_Element
Definition: AbstractActionTestCase.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:25
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer\AbstractActionTestCase\VALUE_PageId
‪const VALUE_PageId
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Core\Tests\Functional\DataScenarios\FlexSectionContainer
Definition: AbstractActionTestCase.php:18