‪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 
91  {
93  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['newElementId']);
94  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelationNDiscardElement.csv');
95  }
96 
102  {
104  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
105  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelationNDiscardContent.csv');
106  }
107 
111  public function ‪modifyElementOfRelation(): void
112  {
113  parent::modifyElementOfRelation();
114  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
115  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv');
116  }
117 
121  public function ‪modifyContentOfRelation(): void
122  {
123  parent::modifyContentOfRelation();
124  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
125  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv');
126  }
127 
131  public function ‪modifyBothSidesOfRelation(): void
132  {
133  parent::modifyBothSidesOfRelation();
134  $this->actionService->clearWorkspaceRecords([
135  self::TABLE_Content => [self::VALUE_ContentIdFirst],
136  self::TABLE_Element => [self::VALUE_ElementIdFirst],
137  ]);
138  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv');
139  }
140 
144  public function ‪deleteContentOfRelation(): void
145  {
146  parent::deleteContentOfRelation();
147  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
148  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv');
149  }
150 
154  public function ‪deleteElementOfRelation(): void
155  {
156  parent::deleteElementOfRelation();
157  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
158  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv');
159  }
160 
164  public function ‪copyContentOfRelation(): void
165  {
166  parent::copyContentOfRelation();
167  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
168  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv');
169  }
170 
174  public function ‪copyElementOfRelation(): void
175  {
176  parent::copyElementOfRelation();
177  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']);
178  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv');
179  }
180 
184  public function ‪localizeContentOfRelation(): void
185  {
186  parent::localizeContentOfRelation();
187  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
188  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv');
189  }
190 
194  public function ‪localizeElementOfRelation(): void
195  {
196  // Create translated page first
197  $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId);
198  parent::localizeElementOfRelation();
199  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']);
200  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv');
201  }
202 
207  {
208  parent::moveContentOfRelationToDifferentPage();
209  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['movedContentId']);
210  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv');
211  }
212 
217  {
218  parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization();
219  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
220  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv');
221  }
222 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:144
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyElementOfRelation
‪modifyElementOfRelation()
Definition: ActionTest.php:111
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteElementOfRelation
‪deleteElementOfRelation()
Definition: ActionTest.php:154
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndAddElementRelation
‪createContentAndAddElementRelation()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:206
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\changeElementRelationSorting
‪changeElementRelationSorting()
Definition: ActionTest.php:69
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\localizeElementOfRelation
‪localizeElementOfRelation()
Definition: ActionTest.php:194
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\changeElementSorting
‪changeElementSorting()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:30
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\addElementRelation
‪addElementRelation()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndCreateElementRelationAndDiscardContent
‪createContentAndCreateElementRelationAndDiscardContent()
Definition: ActionTest.php:101
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:164
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndCreateElementRelationAndDiscardElement
‪createContentAndCreateElementRelationAndDiscardElement()
Definition: ActionTest.php:90
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:121
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\localizeContentOfRelationWithLocalizeReferencesAtParentLocalization
‪localizeContentOfRelationWithLocalizeReferencesAtParentLocalization()
Definition: ActionTest.php:216
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyBothSidesOfRelation
‪modifyBothSidesOfRelation()
Definition: ActionTest.php:131
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteElementRelation
‪deleteElementRelation()
Definition: ActionTest.php:49
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Group\AbstractActionTestCase\createContentAndCreateElementRelation
‪createContentAndCreateElementRelation()
Definition: AbstractActionTestCase.php:103
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\copyElementOfRelation
‪copyElementOfRelation()
Definition: ActionTest.php:174
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:184