‪TYPO3CMS  11.5
ActionTest.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 
26 {
30  public function ‪verifyCleanReferenceIndex(): void
31  {
32  // The test verifies the imported data set has a clean reference index by the check in tearDown()
33  self::assertTrue(true);
34  }
35 
39  public function ‪addElementRelation(): void
40  {
41  parent::addElementRelation();
42  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
43  $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv');
44  }
45 
49  public function ‪deleteElementRelation(): void
50  {
51  parent::deleteElementRelation();
52  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
53  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv');
54  }
55 
59  public function ‪changeElementSorting(): void
60  {
61  parent::changeElementSorting();
62  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
63  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv');
64  }
65 
69  public function ‪changeElementRelationSorting(): void
70  {
71  parent::changeElementRelationSorting();
72  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
73  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv');
74  }
75 
79  public function ‪createContentAndAddElementRelation(): void
80  {
81  parent::createContentAndAddElementRelation();
82  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
83  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv');
84  }
85 
90  {
91  parent::createContentAndCreateElementRelation();
92  $this->actionService->clearWorkspaceRecords([
93  self::TABLE_Content => [$this->recordIds['newContentId']],
94  self::TABLE_Element => [$this->recordIds['newElementId']],
95  ]);
96  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv');
97  }
98 
102  public function ‪modifyElementOfRelation(): void
103  {
104  parent::modifyElementOfRelation();
105  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
106  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv');
107  }
108 
112  public function ‪modifyContentOfRelation(): void
113  {
114  parent::modifyContentOfRelation();
115  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
116  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv');
117  }
118 
122  public function ‪modifyBothSidesOfRelation(): void
123  {
124  parent::modifyBothSidesOfRelation();
125  $this->actionService->clearWorkspaceRecords([
126  self::TABLE_Content => [self::VALUE_ContentIdFirst],
127  self::TABLE_Element => [self::VALUE_ElementIdFirst],
128  ]);
129  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv');
130  }
131 
135  public function ‪deleteContentOfRelation(): void
136  {
137  parent::deleteContentOfRelation();
138  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
139  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv');
140  }
141 
145  public function ‪deleteElementOfRelation(): void
146  {
147  parent::deleteElementOfRelation();
148  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
149  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv');
150  }
151 
155  public function ‪copyContentOfRelation(): void
156  {
157  parent::copyContentOfRelation();
158  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
159  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv');
160  }
161 
165  public function ‪copyElementOfRelation(): void
166  {
167  parent::copyElementOfRelation();
168  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']);
169  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv');
170  }
171 
175  public function ‪localizeContentOfRelation(): void
176  {
177  parent::localizeContentOfRelation();
178  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
179  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv');
180  }
181 
185  public function ‪localizeElementOfRelation(): void
186  {
187  // Create translated page first
188  $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId);
189  parent::localizeElementOfRelation();
190  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']);
191  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv');
192  }
193 
198  {
199  parent::moveContentOfRelationToDifferentPage();
200  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
201  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv');
202  }
203 
208  {
209  parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization();
210  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
211  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv');
212  }
213 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyBothSidesOfRelation
‪modifyBothSidesOfRelation()
Definition: ActionTest.php:122
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\changeElementRelationSorting
‪changeElementRelationSorting()
Definition: ActionTest.php:69
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyElementOfRelation
‪modifyElementOfRelation()
Definition: ActionTest.php:102
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\addElementRelation
‪addElementRelation()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\localizeContentOfRelationWithLocalizeReferencesAtParentLocalization
‪localizeContentOfRelationWithLocalizeReferencesAtParentLocalization()
Definition: ActionTest.php:207
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\changeElementSorting
‪changeElementSorting()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\createContentAndCreateElementRelation
‪createContentAndCreateElementRelation()
Definition: ActionTest.php:89
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\localizeElementOfRelation
‪localizeElementOfRelation()
Definition: ActionTest.php:185
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:197
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteElementOfRelation
‪deleteElementOfRelation()
Definition: ActionTest.php:145
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:175
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:112
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\copyElementOfRelation
‪copyElementOfRelation()
Definition: ActionTest.php:165
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:30
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:155
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteElementRelation
‪deleteElementRelation()
Definition: ActionTest.php:49
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\createContentAndAddElementRelation
‪createContentAndAddElementRelation()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:135