‪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 ‪addCategoryRelation(): void
40  {
41  parent::addCategoryRelation();
42  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
43  $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv');
44  }
45 
49  public function ‪deleteCategoryRelation(): void
50  {
51  parent::deleteCategoryRelation();
52  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
53  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv');
54  }
55 
59  public function ‪changeCategoryRelationSorting(): void
60  {
61  parent::changeCategoryRelationSorting();
62  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
63  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv');
64  }
65 
69  public function ‪createContentAndAddRelation(): void
70  {
71  parent::createContentAndAddRelation();
72  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
73  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv');
74  }
75 
79  public function ‪createCategoryAndAddRelation(): void
80  {
81  parent::createCategoryAndAddRelation();
82  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']);
83  $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNAddRelation.csv');
84  }
85 
89  public function ‪createContentAndCreateRelation(): void
90  {
91  parent::createContentAndCreateRelation();
92  $this->actionService->clearWorkspaceRecords([
93  self::TABLE_Category => [$this->recordIds['newCategoryId']],
94  self::TABLE_Content => [$this->recordIds['newContentId']],
95  ]);
96  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv');
97  }
98 
102  public function ‪createCategoryAndCreateRelation(): void
103  {
104  parent::createCategoryAndCreateRelation();
105  $this->actionService->clearWorkspaceRecords([
106  self::TABLE_Content => [$this->recordIds['newContentId']],
107  self::TABLE_Category => [$this->recordIds['newCategoryId']],
108  ]);
109  $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNCreateRelation.csv');
110  }
111 
116  {
117  parent::createContentWithCategoryAndAddRelation();
118  $this->actionService->clearWorkspaceRecords([
119  self::TABLE_Category => [$this->recordIds['newCategoryId']],
120  self::TABLE_Content => [$this->recordIds['newContentId']],
121  ]);
122  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWCategoryNAddRelation.csv');
123  }
124 
129  {
130  parent::createCategoryWithContentAndAddRelation();
131  $this->actionService->clearWorkspaceRecords([
132  self::TABLE_Content => [$this->recordIds['newContentId']],
133  self::TABLE_Category => [$this->recordIds['newCategoryId']],
134  ]);
135  $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryWContentNAddRelation.csv');
136  }
137 
141  public function ‪modifyCategoryOfRelation(): void
142  {
143  parent::modifyCategoryOfRelation();
144  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
145  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv');
146  }
147 
151  public function ‪modifyContentOfRelation(): void
152  {
153  parent::modifyContentOfRelation();
154  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
155  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv');
156  }
157 
161  public function ‪modifyBothsOfRelation(): void
162  {
163  parent::modifyBothsOfRelation();
164  $this->actionService->clearWorkspaceRecords([
165  self::TABLE_Content => [self::VALUE_ContentIdFirst],
166  self::TABLE_Category => [self::VALUE_CategoryIdFirst],
167  ]);
168  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv');
169  }
170 
174  public function ‪deleteContentOfRelation(): void
175  {
176  parent::deleteContentOfRelation();
177  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
178  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv');
179  }
180 
184  public function ‪deleteCategoryOfRelation(): void
185  {
186  parent::deleteCategoryOfRelation();
187  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
188  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv');
189  }
190 
194  public function ‪copyContentOfRelation(): void
195  {
196  parent::copyContentOfRelation();
197  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
198  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv');
199  }
200 
204  public function ‪copyCategoryOfRelation(): void
205  {
206  parent::copyCategoryOfRelation();
207  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']);
208  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv');
209  }
210 
214  public function ‪localizeContentOfRelation(): void
215  {
216  parent::localizeContentOfRelation();
217  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
218  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv');
219  }
220 
224  public function ‪localizeCategoryOfRelation(): void
225  {
226  // Create translated page first
227  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
228  parent::localizeCategoryOfRelation();
229  $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['localizedCategoryId']);
230  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv');
231  }
232 
237  {
238  parent::moveContentOfRelationToDifferentPage();
239  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
240  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv');
241  }
242 
246  public function ‪copyPage(): void
247  {
248  parent::copyPage();
249  $this->actionService->clearWorkspaceRecords([
250  self::TABLE_Page => [$this->recordIds['newPageId']],
251  ]);
252  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv');
253  }
254 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyCategoryOfRelation
‪copyCategoryOfRelation()
Definition: ActionTest.php:204
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryWithContentAndAddRelation
‪createCategoryWithContentAndAddRelation()
Definition: ActionTest.php:128
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyBothsOfRelation
‪modifyBothsOfRelation()
Definition: ActionTest.php:161
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentAndAddRelation
‪createContentAndAddRelation()
Definition: ActionTest.php:69
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\changeCategoryRelationSorting
‪changeCategoryRelationSorting()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryAndCreateRelation
‪createCategoryAndCreateRelation()
Definition: ActionTest.php:102
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:30
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentWithCategoryAndAddRelation
‪createContentWithCategoryAndAddRelation()
Definition: ActionTest.php:115
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\moveContentOfRelationToDifferentPage
‪moveContentOfRelationToDifferentPage()
Definition: ActionTest.php:236
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyCategoryOfRelation
‪modifyCategoryOfRelation()
Definition: ActionTest.php:141
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\localizeCategoryOfRelation
‪localizeCategoryOfRelation()
Definition: ActionTest.php:224
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteCategoryRelation
‪deleteCategoryRelation()
Definition: ActionTest.php:49
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createContentAndCreateRelation
‪createContentAndCreateRelation()
Definition: ActionTest.php:89
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyContentOfRelation
‪copyContentOfRelation()
Definition: ActionTest.php:194
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\addCategoryRelation
‪addCategoryRelation()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\createCategoryAndAddRelation
‪createCategoryAndAddRelation()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\localizeContentOfRelation
‪localizeContentOfRelation()
Definition: ActionTest.php:214
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteContentOfRelation
‪deleteContentOfRelation()
Definition: ActionTest.php:174
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\modifyContentOfRelation
‪modifyContentOfRelation()
Definition: ActionTest.php:151
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:246
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\Discard\ActionTest\deleteCategoryOfRelation
‪deleteCategoryOfRelation()
Definition: ActionTest.php:184