‪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/ManyToMany/Discard/DataSet/';
29 
33  protected ‪$assertCleanReferenceIndex = false;
34 
38  public function ‪addCategoryRelation()
39  {
40  parent::addCategoryRelation();
41  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
42  $this->‪assertAssertionDataSet('addCategoryRelation');
43  }
44 
48  public function ‪deleteCategoryRelation()
49  {
50  parent::deleteCategoryRelation();
51  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
52  $this->‪assertAssertionDataSet('deleteCategoryRelation');
53  }
54 
58  public function ‪changeCategoryRelationSorting()
59  {
60  parent::changeCategoryRelationSorting();
61  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
62  $this->‪assertAssertionDataSet('changeCategoryRelationSorting');
63  }
64 
68  public function ‪createContentAndAddRelation()
69  {
70  parent::createContentAndAddRelation();
71  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
72  $this->‪assertAssertionDataSet('createContentNAddRelation');
73  }
74 
78  public function ‪createCategoryAndAddRelation()
79  {
80  parent::createCategoryAndAddRelation();
81  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']);
82  $this->‪assertAssertionDataSet('createCategoryNAddRelation');
83  }
84 
88  public function ‪createContentAndCreateRelation()
89  {
90  parent::createContentAndCreateRelation();
91  $this->actionService->clearWorkspaceRecords([
92  self::TABLE_Category => [$this->recordIds['newCategoryId']],
93  self::TABLE_Content => [$this->recordIds['newContentId']],
94  ]);
95  $this->‪assertAssertionDataSet('createContentNCreateRelation');
96  }
97 
101  public function ‪createCategoryAndCreateRelation()
102  {
103  parent::createCategoryAndCreateRelation();
104  $this->actionService->clearWorkspaceRecords([
105  self::TABLE_Content => [$this->recordIds['newContentId']],
106  self::TABLE_Category => [$this->recordIds['newCategoryId']],
107  ]);
108  $this->‪assertAssertionDataSet('createCategoryNCreateRelation');
109  }
110 
115  {
116  parent::createContentWithCategoryAndAddRelation();
117  $this->actionService->clearWorkspaceRecords([
118  self::TABLE_Category => [$this->recordIds['newCategoryId']],
119  self::TABLE_Content => [$this->recordIds['newContentId']],
120  ]);
121  $this->‪assertAssertionDataSet('createContentWCategoryNAddRelation');
122  }
123 
128  {
129  parent::createCategoryWithContentAndAddRelation();
130  $this->actionService->clearWorkspaceRecords([
131  self::TABLE_Content => [$this->recordIds['newContentId']],
132  self::TABLE_Category => [$this->recordIds['newCategoryId']],
133  ]);
134  $this->‪assertAssertionDataSet('createCategoryWContentNAddRelation');
135  }
136 
140  public function ‪modifyCategoryOfRelation()
141  {
142  parent::modifyCategoryOfRelation();
143  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
144  $this->‪assertAssertionDataSet('modifyCategoryOfRelation');
145  }
146 
150  public function ‪modifyContentOfRelation()
151  {
152  parent::modifyContentOfRelation();
153  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
154  $this->‪assertAssertionDataSet('modifyContentOfRelation');
155  }
156 
160  public function ‪modifyBothsOfRelation()
161  {
162  parent::modifyBothsOfRelation();
163  $this->actionService->clearWorkspaceRecords([
164  self::TABLE_Content => [self::VALUE_ContentIdFirst],
165  self::TABLE_Category => [self::VALUE_CategoryIdFirst],
166  ]);
167  $this->‪assertAssertionDataSet('modifyBothsOfRelation');
168  }
169 
173  public function ‪deleteContentOfRelation()
174  {
175  parent::deleteContentOfRelation();
176  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
177  $this->‪assertAssertionDataSet('deleteContentOfRelation');
178  }
179 
183  public function ‪deleteCategoryOfRelation()
184  {
185  parent::deleteCategoryOfRelation();
186  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
187  $this->‪assertAssertionDataSet('deleteCategoryOfRelation');
188  }
189 
193  public function ‪copyContentOfRelation()
194  {
195  parent::copyContentOfRelation();
196  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
197  $this->‪assertAssertionDataSet('copyContentOfRelation');
198  }
199 
203  public function ‪copyCategoryOfRelation()
204  {
205  parent::copyCategoryOfRelation();
206  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']);
207  $this->‪assertAssertionDataSet('copyCategoryOfRelation');
208  }
209 
213  public function ‪localizeContentOfRelation()
214  {
215  parent::localizeContentOfRelation();
216  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
217  $this->‪assertAssertionDataSet('localizeContentOfRelation');
218  }
219 
223  public function ‪localizeCategoryOfRelation()
224  {
225  // Create translated page first
226  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
227  parent::localizeCategoryOfRelation();
228  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['localizedCategoryId']);
229  $this->‪assertAssertionDataSet('localizeCategoryOfRelation');
230  }
231 
236  {
237  parent::moveContentOfRelationToDifferentPage();
238  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
239  $this->‪assertAssertionDataSet('moveContentOfRelationToDifferentPage');
240  }
241 
245  public function ‪copyPage()
246  {
247  parent::copyPage();
248  $this->actionService->clearWorkspaceRecords([
249  self::TABLE_Page => [$this->recordIds['newPageId']],
250  ]);
251  $this->‪assertAssertionDataSet('copyPage');
252  }
253 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyCategoryOfRelation
‪copyCategoryOfRelation()
Definition: ActionTest.php:201
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryWithContentAndAddRelation
‪createCategoryWithContentAndAddRelation()
Definition: ActionTest.php:125
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyBothsOfRelation
‪modifyBothsOfRelation()
Definition: ActionTest.php:158
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentAndAddRelation
‪createContentAndAddRelation()
Definition: ActionTest.php:66
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest
Definition: ActionTest.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\changeCategoryRelationSorting
‪changeCategoryRelationSorting()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryAndCreateRelation
‪createCategoryAndCreateRelation()
Definition: ActionTest.php:99
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentWithCategoryAndAddRelation
‪createContentWithCategoryAndAddRelation()
Definition: ActionTest.php:112
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:233
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyCategoryOfRelation
‪modifyCategoryOfRelation()
Definition: ActionTest.php:138
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\localizeCategoryOfRelation
‪localizeCategoryOfRelation()
Definition: ActionTest.php:221
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteCategoryRelation
‪deleteCategoryRelation()
Definition: ActionTest.php:46
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentAndCreateRelation
‪createContentAndCreateRelation()
Definition: ActionTest.php:86
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard
Definition: ActionTest.php:16
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:191
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\addCategoryRelation
‪addCategoryRelation()
Definition: ActionTest.php:36
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryAndAddRelation
‪createCategoryAndAddRelation()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:211
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:171
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:148
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:31
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:243
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteCategoryOfRelation
‪deleteCategoryOfRelation()
Definition: ActionTest.php:181