‪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/FAL/Discard/DataSet/';
29 
33  protected ‪$assertCleanReferenceIndex = false;
34 
38  public function ‪modifyContent()
39  {
40  parent::modifyContent();
41  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
42  $this->‪assertAssertionDataSet('modifyContent');
43  }
44 
48  public function ‪deleteContent()
49  {
50  parent::deleteContent();
51  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
52  $this->‪assertAssertionDataSet('deleteContent');
53  }
54 
58  public function ‪copyContent()
59  {
60  parent::copyContent();
61  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
62  $this->‪assertAssertionDataSet('copyContent');
63  }
64 
68  public function ‪localizeContent()
69  {
70  // Create translated page first
71  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
72  parent::localizeContent();
73  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
74  $this->‪assertAssertionDataSet('localizeContent');
75  }
76 
80  public function ‪changeContentSorting()
81  {
82  parent::changeContentSorting();
83  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
84  $this->‪assertAssertionDataSet('changeContentSorting');
85  }
86 
90  public function ‪moveContentToDifferentPage()
91  {
92  $newRecordIds = parent::moveContentToDifferentPage();
93  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $newRecordIds[self::TABLE_Content][self::VALUE_ContentIdLast]);
94  $this->‪assertAssertionDataSet('moveContentToDifferentPage');
95  }
96 
101  {
102  parent::moveContentToDifferentPageAndChangeSorting();
103  $this->actionService->clearWorkspaceRecords([
104  self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast],
105  ]);
106  $this->‪assertAssertionDataSet('moveContentToDifferentPageNChangeSorting');
107  }
108 
116  public function ‪createContentWithFileReference()
117  {
118  parent::createContentWithFileReference();
119  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
120  $this->‪assertAssertionDataSet('createContentWFileReference');
121  }
122 
126  public function ‪modifyContentWithFileReference()
127  {
128  parent::modifyContentWithFileReference();
129  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
130  $this->‪assertAssertionDataSet('modifyContentWFileReference');
131  }
132 
136  public function ‪modifyContentAndAddFileReference()
137  {
138  parent::modifyContentAndAddFileReference();
139  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
140  $this->‪assertAssertionDataSet('modifyContentNAddFileReference');
141  }
142 
147  {
148  parent::modifyContentAndDeleteFileReference();
149  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
150  $this->‪assertAssertionDataSet('modifyContentNDeleteFileReference');
151  }
152 
157  {
158  parent::modifyContentAndDeleteAllFileReference();
159  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
160  $this->‪assertAssertionDataSet('modifyContentNDeleteAllFileReference');
161  }
162 
167  {
168  parent::createContentWithFileReferenceAndDeleteFileReference();
169  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
170  $this->‪assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference');
171  // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state.
172  }
173 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard
Definition: ActionTest.php:16
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndDeleteAllFileReference
‪modifyContentAndDeleteAllFileReference()
Definition: ActionTest.php:154
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContent
‪modifyContent()
Definition: ActionTest.php:36
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\changeContentSorting
‪changeContentSorting()
Definition: ActionTest.php:78
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\moveContentToDifferentPage
‪moveContentToDifferentPage()
Definition: ActionTest.php:88
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndAddFileReference
‪modifyContentAndAddFileReference()
Definition: ActionTest.php:134
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentWithFileReference
‪modifyContentWithFileReference()
Definition: ActionTest.php:124
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\deleteContent
‪deleteContent()
Definition: ActionTest.php:46
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\moveContentToDifferentPageAndChangeSorting
‪moveContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:98
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\createContentWithFileReference
‪createContentWithFileReference()
Definition: ActionTest.php:114
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndDeleteFileReference
‪modifyContentAndDeleteFileReference()
Definition: ActionTest.php:144
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\createContentWithFileReferenceAndDeleteFileReference
‪createContentWithFileReferenceAndDeleteFileReference()
Definition: ActionTest.php:164
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\localizeContent
‪localizeContent()
Definition: ActionTest.php:66
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\copyContent
‪copyContent()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest
Definition: ActionTest.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:31