‪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/IRRE/ForeignField/Discard/DataSet/';
29 
33  protected ‪$assertCleanReferenceIndex = false;
34 
38  public function ‪createParentContent()
39  {
40  parent::createParentContent();
41  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
42  $this->‪assertAssertionDataSet('createParentContent');
43  }
44 
48  public function ‪modifyParentContent()
49  {
50  parent::modifyParentContent();
51  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
52  $this->‪assertAssertionDataSet('modifyParentContent');
53  }
54 
58  public function ‪deleteParentContent()
59  {
60  parent::deleteParentContent();
61  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
62  $this->‪assertAssertionDataSet('deleteParentContent');
63  }
64 
68  public function ‪copyParentContent()
69  {
70  parent::copyParentContent();
71  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
72  $this->‪assertAssertionDataSet('copyParentContent');
73  }
74 
78  public function ‪copyParentContentToDifferentPage()
79  {
80  parent::copyParentContentToDifferentPage();
81  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
82  $this->‪assertAssertionDataSet('copyParentContentToDifferentPage');
83  }
84 
89  {
90  // Create translated page first
91  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
92  parent::localizeParentContentWithAllChildren();
93  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
94  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
95  }
96 
100  public function ‪changeParentContentSorting()
101  {
102  parent::changeParentContentSorting();
103  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
104  $this->‪assertAssertionDataSet('changeParentContentSorting');
105  }
106 
110  public function ‪moveParentContentToDifferentPage()
111  {
112  parent::moveParentContentToDifferentPage();
113  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
114  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
115  }
116 
121  {
122  parent::moveParentContentToDifferentPageTwice();
123  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
124  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageTwice');
125  }
126 
131  {
132  parent::moveParentContentToDifferentPageAndChangeSorting();
133  $this->actionService->clearWorkspaceRecords([
134  self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast],
135  ]);
136  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
137  }
138 
146  public function ‪modifyPage()
147  {
148  parent::modifyPage();
149  $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId);
150  $this->‪assertAssertionDataSet('modifyPage');
151  }
152 
156  public function ‪deletePage()
157  {
158  parent::deletePage();
159  $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId);
160  $this->‪assertAssertionDataSet('deletePage');
161  }
162 
166  public function ‪copyPage()
167  {
168  parent::copyPage();
169  $this->actionService->clearWorkspaceRecords([
170  self::TABLE_Page => [$this->recordIds['newPageId']],
171  ]);
172  $this->‪assertAssertionDataSet('copyPage');
173  }
174 
179  {
180  parent::copyPageWithHotelBeforeParentContent();
181  $this->actionService->clearWorkspaceRecords([
182  self::TABLE_Page => [$this->recordIds['newPageId']],
183  ]);
184  $this->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
185  }
186 
195  {
196  parent::createParentContentWithHotelAndOfferChildren();
197  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
198  $this->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
199  }
200 
205  {
206  parent::createAndCopyParentContentWithHotelAndOfferChildren();
207  $versionedCopiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, $this->recordIds['copiedContentId']);
208  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $versionedCopiedContentId);
209  $this->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
210  }
211 
216  {
217  // Create translated page first
218  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
219  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
220  // Discard created default language parent
221  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
222  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
223  }
224 
230  {
231  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
232  $this->‪assertAssertionDataSet('createNLocParentNHotelNOfferChildrenNDiscardLocParent');
233  }
234 
238  public function ‪modifyOnlyHotelChild()
239  {
240  parent::modifyOnlyHotelChild();
241  $this->actionService->clearWorkspaceRecord(self::TABLE_Hotel, 4);
242  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
243  }
244 
249  {
250  parent::modifyParentAndChangeHotelChildrenSorting();
251  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
252  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
253  }
254 
258  public function ‪modifyParentWithHotelChild()
259  {
260  parent::modifyParentWithHotelChild();
261  $modifiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, self::VALUE_ContentIdFirst);
262  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $modifiedContentId);
263  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
264  }
265 
269  public function ‪modifyParentAndAddHotelChild()
270  {
271  parent::modifyParentAndAddHotelChild();
272  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
273  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
274  }
275 
279  public function ‪modifyParentAndDeleteHotelChild()
280  {
281  parent::modifyParentAndDeleteHotelChild();
282  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
283  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
284  }
285 
290  {
291  parent::modifyAndDiscardAndModifyParentWithHotelChild();
292  $this->actionService->clearWorkspaceRecords([
293  self::TABLE_Content => [self::VALUE_ContentIdFirst],
294  self::TABLE_Hotel => [3, 4],
295  ]);
296  $this->‪assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
297  }
298 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:176
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:236
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:31
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:46
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:202
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:144
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:66
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:98
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:118
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:213
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:192
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:36
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest
Definition: ActionTest.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:108
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:128
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:86
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:277
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard
Definition: ActionTest.php:16
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:287
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:256
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent
‪createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent()
Definition: ActionTest.php:227
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:246
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:164
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:154
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Discard\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:267