2 namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany;
20 abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
54 $this->importScenarioDataSet(
'LiveDefaultPages');
55 $this->importScenarioDataSet(
'LiveDefaultElements');
56 $this->importScenarioDataSet(
'ReferenceIndex');
58 $this->setUpFrontendRootPage(1, array(
'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts'));
59 $this->backendUser->workspace = self::VALUE_WorkspaceId;
72 $this->actionService->modifyReferences(
73 self::TABLE_Content, self::VALUE_ContentIdFirst,
'categories', array(self::VALUE_CategoryIdFirst, self::VALUE_CategoryIdSecond, self::VALUE_CategoryIdLast)
83 $this->actionService->modifyReferences(
84 self::TABLE_Content, self::VALUE_ContentIdFirst,
'categories', array(self::VALUE_CategoryIdFirst)
94 $this->actionService->modifyReferences(
95 self::TABLE_Content, self::VALUE_ContentIdFirst,
'categories', array(self::VALUE_CategoryIdSecond, self::VALUE_CategoryIdFirst)
105 $newTableIds = $this->actionService->createNewRecord(
106 self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1',
'categories' => self::VALUE_CategoryIdSecond)
108 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
117 $newTableIds = $this->actionService->createNewRecord(
118 self::TABLE_Category, 0, array(
'title' =>
'Testing #1',
'items' =>
'tt_content_' . self::VALUE_ContentIdFirst)
120 $this->recordIds[
'newCategoryId'] = $newTableIds[self::TABLE_Category][0];
129 $newTableIds = $this->actionService->createNewRecords(
132 self::TABLE_Category => array(
'pid' => 0,
'title' =>
'Testing #1'),
133 self::TABLE_Content => array(
'header' =>
'Testing #1',
'categories' =>
'__previousUid'),
136 $this->recordIds[
'newCategoryId'] = $newTableIds[self::TABLE_Category][0];
137 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
146 $newTableIds = $this->actionService->createNewRecords(
149 self::TABLE_Content => array(
'header' =>
'Testing #1'),
150 self::TABLE_Category => array(
'pid' => 0,
'title' =>
'Testing #1',
'items' =>
'tt_content___previousUid'),
153 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
154 $this->recordIds[
'newCategoryId'] = $newTableIds[self::TABLE_Category][0];
162 $this->actionService->modifyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, array(
'title' =>
'Testing #1'));
170 $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, array(
'header' =>
'Testing #1'));
178 $this->actionService->modifyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, array(
'title' =>
'Testing #1'));
179 $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, array(
'header' =>
'Testing #1'));
187 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
195 $this->actionService->deleteRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
203 $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId);
204 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
212 $newTableIds = $this->actionService->copyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, 0);
213 $this->recordIds[
'newCategoryId'] = $newTableIds[self::TABLE_Category][self::VALUE_CategoryIdFirst];
221 $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
222 $this->recordIds[
'localizedContentId'] = $localizedTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
230 $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, self::VALUE_LanguageId);
231 $this->recordIds[
'localizedCategoryId'] = $localizedTableIds[self::TABLE_Category][self::VALUE_CategoryIdFirst];
239 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
247 $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
248 $this->recordIds[
'newPageId'] = $newTableIds[self::TABLE_Page][self::VALUE_PageId];
249 $this->recordIds[
'newContentIdFirst'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdFirst];
250 $this->recordIds[
'newContentIdLast'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];