‪TYPO3CMS  10.4
ActionTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
24 {
28  protected ‪$assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/DataSet/';
29 
33  protected ‪$assertCleanReferenceIndex = false;
34 
38  public function ‪addElementRelation()
39  {
40  parent::addElementRelation();
41  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
42  $this->‪assertAssertionDataSet('addElementRelation');
43  }
44 
48  public function ‪deleteElementRelation()
49  {
50  parent::deleteElementRelation();
51  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
52  $this->‪assertAssertionDataSet('deleteElementRelation');
53  }
54 
58  public function ‪changeElementSorting()
59  {
60  parent::changeElementSorting();
61  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
62  $this->‪assertAssertionDataSet('changeElementSorting');
63  }
64 
68  public function ‪changeElementRelationSorting()
69  {
70  parent::changeElementRelationSorting();
71  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
72  $this->‪assertAssertionDataSet('changeElementRelationSorting');
73  }
74 
79  {
80  parent::createContentAndAddElementRelation();
81  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
82  $this->‪assertAssertionDataSet('createContentNAddRelation');
83  }
84 
90  {
91  parent::createContentAndCreateElementRelation();
92  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['newElementId']);
93  $this->‪assertAssertionDataSet('createContentNCreateRelationNDiscardElement');
94  }
95 
101  {
102  parent::createContentAndCreateElementRelation();
103  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
104  $this->‪assertAssertionDataSet('createContentNCreateRelationNDiscardContent');
105  }
106 
110  public function ‪modifyElementOfRelation()
111  {
112  parent::modifyElementOfRelation();
113  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
114  $this->‪assertAssertionDataSet('modifyElementOfRelation');
115  }
116 
120  public function ‪modifyContentOfRelation()
121  {
122  parent::modifyContentOfRelation();
123  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
124  $this->‪assertAssertionDataSet('modifyContentOfRelation');
125  }
126 
130  public function ‪modifyBothSidesOfRelation()
131  {
132  parent::modifyBothSidesOfRelation();
133  $this->actionService->clearWorkspaceRecords([
134  self::TABLE_Content => [self::VALUE_ContentIdFirst],
135  self::TABLE_Element => [self::VALUE_ElementIdFirst],
136  ]);
137  $this->‪assertAssertionDataSet('modifyBothSidesOfRelation');
138  }
139 
143  public function ‪deleteContentOfRelation()
144  {
145  parent::deleteContentOfRelation();
146  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
147  $this->‪assertAssertionDataSet('deleteContentOfRelation');
148  }
149 
153  public function ‪deleteElementOfRelation()
154  {
155  parent::deleteElementOfRelation();
156  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
157  $this->‪assertAssertionDataSet('deleteElementOfRelation');
158  }
159 
163  public function ‪copyContentOfRelation()
164  {
165  parent::copyContentOfRelation();
166  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
167  $this->‪assertAssertionDataSet('copyContentOfRelation');
168  }
169 
173  public function ‪copyElementOfRelation()
174  {
175  parent::copyElementOfRelation();
176  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']);
177  $this->‪assertAssertionDataSet('copyElementOfRelation');
178  }
179 
183  public function ‪localizeContentOfRelation()
184  {
185  parent::localizeContentOfRelation();
186  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
187  $this->‪assertAssertionDataSet('localizeContentOfRelation');
188  }
189 
193  public function ‪localizeElementOfRelation()
194  {
195  // Create translated page first
196  $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId);
197  parent::localizeElementOfRelation();
198  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']);
199  $this->‪assertAssertionDataSet('localizeElementOfRelation');
200  }
201 
206  {
207  parent::moveContentOfRelationToDifferentPage();
208  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['movedContentId']);
209  $this->‪assertAssertionDataSet('moveContentOfRelationToDifferentPage');
210  }
211 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:141
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyElementOfRelation
‪modifyElementOfRelation()
Definition: ActionTest.php:108
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteElementOfRelation
‪deleteElementOfRelation()
Definition: ActionTest.php:151
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndAddElementRelation
‪createContentAndAddElementRelation()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:203
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard
Definition: ActionTest.php:16
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\changeElementRelationSorting
‪changeElementRelationSorting()
Definition: ActionTest.php:66
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\localizeElementOfRelation
‪localizeElementOfRelation()
Definition: ActionTest.php:191
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\changeElementSorting
‪changeElementSorting()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest
Definition: ActionTest.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\addElementRelation
‪addElementRelation()
Definition: ActionTest.php:36
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndCreateElementRelationAndDiscardContent
‪createContentAndCreateElementRelationAndDiscardContent()
Definition: ActionTest.php:98
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:161
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:31
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\createContentAndCreateElementRelationAndDiscardElement
‪createContentAndCreateElementRelationAndDiscardElement()
Definition: ActionTest.php:87
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:118
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\modifyBothSidesOfRelation
‪modifyBothSidesOfRelation()
Definition: ActionTest.php:128
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\deleteElementRelation
‪deleteElementRelation()
Definition: ActionTest.php:46
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\copyElementOfRelation
‪copyElementOfRelation()
Definition: ActionTest.php:171
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:181