‪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/Select/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 
89  {
90  parent::createContentAndCreateElementRelation();
91  $this->actionService->clearWorkspaceRecords([
92  self::TABLE_Content => [$this->recordIds['newContentId']],
93  self::TABLE_Element => [$this->recordIds['newElementId']],
94  ]);
95  $this->‪assertAssertionDataSet('createContentNCreateRelation');
96  }
97 
101  public function ‪modifyElementOfRelation()
102  {
103  parent::modifyElementOfRelation();
104  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
105  $this->‪assertAssertionDataSet('modifyElementOfRelation');
106  }
107 
111  public function ‪modifyContentOfRelation()
112  {
113  parent::modifyContentOfRelation();
114  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
115  $this->‪assertAssertionDataSet('modifyContentOfRelation');
116  }
117 
121  public function ‪modifyBothSidesOfRelation()
122  {
123  parent::modifyBothSidesOfRelation();
124  $this->actionService->clearWorkspaceRecords([
125  self::TABLE_Content => [self::VALUE_ContentIdFirst],
126  self::TABLE_Element => [self::VALUE_ElementIdFirst],
127  ]);
128  $this->‪assertAssertionDataSet('modifyBothSidesOfRelation');
129  }
130 
134  public function ‪deleteContentOfRelation()
135  {
136  parent::deleteContentOfRelation();
137  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
138  $this->‪assertAssertionDataSet('deleteContentOfRelation');
139  }
140 
144  public function ‪deleteElementOfRelation()
145  {
146  parent::deleteElementOfRelation();
147  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst);
148  $this->‪assertAssertionDataSet('deleteElementOfRelation');
149  }
150 
154  public function ‪copyContentOfRelation()
155  {
156  parent::copyContentOfRelation();
157  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
158  $this->‪assertAssertionDataSet('copyContentOfRelation');
159  }
160 
164  public function ‪copyElementOfRelation()
165  {
166  parent::copyElementOfRelation();
167  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']);
168  $this->‪assertAssertionDataSet('copyElementOfRelation');
169  }
170 
174  public function ‪localizeContentOfRelation()
175  {
176  parent::localizeContentOfRelation();
177  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
178  $this->‪assertAssertionDataSet('localizeContentOfRelation');
179  }
180 
184  public function ‪localizeElementOfRelation()
185  {
186  // Create translated page first
187  $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId);
188  parent::localizeElementOfRelation();
189  $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']);
190  $this->‪assertAssertionDataSet('localizeElementOfRelation');
191  }
192 
197  {
198  parent::moveContentOfRelationToDifferentPage();
199  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
200  $this->‪assertAssertionDataSet('moveContentOfRelationToDifferentPage');
201  }
202 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyBothSidesOfRelation
‪modifyBothSidesOfRelation()
Definition: ActionTest.php:119
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\changeElementRelationSorting
‪changeElementRelationSorting()
Definition: ActionTest.php:66
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest
Definition: ActionTest.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyElementOfRelation
‪modifyElementOfRelation()
Definition: ActionTest.php:99
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\addElementRelation
‪addElementRelation()
Definition: ActionTest.php:36
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\changeElementSorting
‪changeElementSorting()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\createContentAndCreateElementRelation
‪createContentAndCreateElementRelation()
Definition: ActionTest.php:86
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\localizeElementOfRelation
‪localizeElementOfRelation()
Definition: ActionTest.php:182
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:194
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:31
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteElementOfRelation
‪deleteElementOfRelation()
Definition: ActionTest.php:142
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\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\Select\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:172
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:109
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\copyElementOfRelation
‪copyElementOfRelation()
Definition: ActionTest.php:162
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:152
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteElementRelation
‪deleteElementRelation()
Definition: ActionTest.php:46
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\createContentAndAddElementRelation
‪createContentAndAddElementRelation()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:132