‪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 ‪modifyContent(): void
40  {
41  parent::modifyContent();
42  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
43  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv');
44  }
45 
49  public function ‪deleteContent(): void
50  {
51  parent::deleteContent();
52  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
53  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv');
54  }
55 
59  public function ‪copyContent(): void
60  {
61  parent::copyContent();
62  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
63  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv');
64  }
65 
69  public function ‪localizeContent(): void
70  {
71  parent::localizeContent();
72  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
73  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv');
74  }
75 
79  public function ‪changeContentSorting(): void
80  {
81  parent::changeContentSorting();
82  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
83  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv');
84  }
85 
89  public function ‪moveContentToDifferentPage(): void
90  {
91  $newRecordIds = parent::moveContentToDifferentPage();
92  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $newRecordIds[self::TABLE_Content][self::VALUE_ContentIdLast]);
93  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv');
94  }
95 
100  {
101  parent::moveContentToDifferentPageAndChangeSorting();
102  $this->actionService->clearWorkspaceRecords([
103  self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast],
104  ]);
105  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv');
106  }
107 
115  public function ‪createContentWithFileReference(): void
116  {
117  parent::createContentWithFileReference();
118  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
119  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv');
120  }
121 
125  public function ‪modifyContentWithFileReference(): void
126  {
127  parent::modifyContentWithFileReference();
128  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
129  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv');
130  }
131 
135  public function ‪modifyContentAndAddFileReference(): void
136  {
137  parent::modifyContentAndAddFileReference();
138  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
139  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv');
140  }
141 
146  {
147  parent::modifyContentAndDeleteFileReference();
148  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
149  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv');
150  }
151 
156  {
157  parent::modifyContentAndDeleteAllFileReference();
158  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
159  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv');
160  }
161 
166  {
167  parent::createContentWithFileReferenceAndDeleteFileReference();
168  $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']);
169  $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv');
170  // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state.
171  }
172 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndDeleteAllFileReference
‪modifyContentAndDeleteAllFileReference()
Definition: ActionTest.php:155
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContent
‪modifyContent()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\changeContentSorting
‪changeContentSorting()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\moveContentToDifferentPage
‪moveContentToDifferentPage()
Definition: ActionTest.php:89
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndAddFileReference
‪modifyContentAndAddFileReference()
Definition: ActionTest.php:135
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentWithFileReference
‪modifyContentWithFileReference()
Definition: ActionTest.php:125
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\deleteContent
‪deleteContent()
Definition: ActionTest.php:49
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\moveContentToDifferentPageAndChangeSorting
‪moveContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:99
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\createContentWithFileReference
‪createContentWithFileReference()
Definition: ActionTest.php:115
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\modifyContentAndDeleteFileReference
‪modifyContentAndDeleteFileReference()
Definition: ActionTest.php:145
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\createContentWithFileReferenceAndDeleteFileReference
‪createContentWithFileReferenceAndDeleteFileReference()
Definition: ActionTest.php:165
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\localizeContent
‪localizeContent()
Definition: ActionTest.php:69
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:30
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest\copyContent
‪copyContent()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\Discard\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24