2 namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Regular;
20 abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
53 $this->importScenarioDataSet(
'LiveDefaultPages');
54 $this->importScenarioDataSet(
'LiveDefaultElements');
55 $this->importScenarioDataSet(
'ReferenceIndex');
57 $this->setUpFrontendRootPage(1, array(
'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts'));
58 $this->backendUser->workspace = self::VALUE_WorkspaceId;
71 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1'));
72 $this->recordIds[
'newContentIdFirst'] = $newTableIds[self::TABLE_Content][0];
74 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, -self::VALUE_ContentIdSecond, array(
'header' =>
'Testing #2'));
75 $this->recordIds[
'newContentIdLast'] = $newTableIds[self::TABLE_Content][0];
83 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1'));
84 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
85 $versionedNewContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, $this->recordIds[
'newContentId']);
86 $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $versionedNewContentId);
94 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1'));
95 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
96 $copiedTableIds = $this->actionService->copyRecord(self::TABLE_Content, $this->recordIds[
'newContentId'], self::VALUE_PageId);
97 $this->recordIds[
'copiedContentId'] = $copiedTableIds[self::TABLE_Content][$this->recordIds[
'newContentId']];
98 $versionedCopiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, $this->recordIds[
'copiedContentId']);
99 $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $versionedCopiedContentId);
107 $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, array(
'header' =>
'Testing #1'));
115 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdSecond);
123 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized);
124 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdThird);
132 $copiedTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageId);
133 $this->recordIds[
'copiedContentId'] = $copiedTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
141 $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
142 $this->recordIds[
'localizedContentId'] = $localizedTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
150 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
158 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
159 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
167 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
169 $this->backendUser->workspace = 0;
170 $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
172 $this->backendUser->workspace = static::VALUE_WorkspaceId;
180 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget);
188 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget);
189 $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
201 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, self::VALUE_PageId, array(
'title' =>
'Testing #1',
'hidden' => 0));
202 $this->recordIds[
'newPageId'] = $newTableIds[self::TABLE_Page][0];
210 $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, array(
'title' =>
'Testing #1'));
218 $this->actionService->deleteRecord(self::TABLE_Page, self::VALUE_PageId);
226 $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
227 $this->recordIds[
'newPageId'] = $newTableIds[self::TABLE_Page][self::VALUE_PageId];
228 $this->recordIds[
'newContentIdFirst'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdFirst];
229 $this->recordIds[
'newContentIdLast'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
237 $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
238 $this->recordIds[
'localizedPageOverlayId'] = $localizedTableIds[self::TABLE_PageOverlay][self::VALUE_PageId];
246 $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
254 $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
262 $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdWebsite);
263 $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
273 $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdWebsite);
274 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, -self::VALUE_PageIdTarget, array(
'title' =>
'Testing #1',
'hidden' => 0));
275 $this->recordIds[
'newPageId'] = $newTableIds[self::TABLE_Page][0];
283 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1'));
284 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
285 $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
286 $this->recordIds[
'copiedPageId'] = $newTableIds[self::TABLE_Page][self::VALUE_PageId];
294 $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array(
'header' =>
'Testing #1'));
295 $this->recordIds[
'newContentId'] = $newTableIds[self::TABLE_Content][0];
298 $this->backendUser->workspace = 0;
300 $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
301 $this->recordIds[
'copiedPageId'] = $newTableIds[self::TABLE_Page][self::VALUE_PageId];
304 $this->backendUser->workspace = static::VALUE_WorkspaceId;
312 $this->backendUser->uc[
'copyLevels'] = 10;
314 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, static::VALUE_PageId, array(
'title' =>
'Testing #1',
'hidden' => 0));
315 $this->recordIds[
'newPageId'] = $newTableIds[static::TABLE_Page][0];
316 $newTableIds = $this->actionService->copyRecord(static::TABLE_Page, static::VALUE_PageId, static::VALUE_PageIdTarget);
317 $this->recordIds[
'copiedPageId'] = $newTableIds[static::TABLE_Page][static::VALUE_PageId];
324 $this->backendUser->uc[
'copyLevels'] = 10;
326 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, static::VALUE_PageId, array(
'title' =>
'Testing #1',
'hidden' => 0));
327 $this->recordIds[
'newPageId'] = $newTableIds[static::TABLE_Page][0];
330 $this->backendUser->workspace = 0;
332 $newTableIds = $this->actionService->copyRecord(static::TABLE_Page, static::VALUE_PageId, static::VALUE_PageIdTarget);
333 $this->recordIds[
'copiedPageId'] = $newTableIds[static::TABLE_Page][static::VALUE_PageId];
336 $this->backendUser->workspace = static::VALUE_WorkspaceId;
344 $this->backendUser->uc[
'copyLevels'] = 10;
346 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, static::VALUE_PageId, array(
'title' =>
'Testing #1',
'hidden' => 0));
347 $this->recordIds[
'newPageIdFirst'] = $newTableIds[static::TABLE_Page][0];
348 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, $this->recordIds[
'newPageIdFirst'], array(
'title' =>
'Testing #2',
'hidden' => 0));
349 $this->recordIds[
'newPageIdSecond'] = $newTableIds[static::TABLE_Page][0];
350 $newTableIds = $this->actionService->copyRecord(static::TABLE_Page, static::VALUE_PageId, static::VALUE_PageIdTarget);
351 $this->recordIds[
'copiedPageId'] = $newTableIds[static::TABLE_Page][static::VALUE_PageId];
352 $this->recordIds[
'copiedPageIdFirst'] = $newTableIds[static::TABLE_Page][$this->recordIds[
'newPageIdFirst']];
353 $this->recordIds[
'copiedPageIdSecond'] = $newTableIds[static::TABLE_Page][$this->recordIds[
'newPageIdSecond']];
361 $this->backendUser->uc[
'copyLevels'] = 10;
363 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, static::VALUE_PageId, array(
'title' =>
'Testing #1',
'hidden' => 0));
364 $this->recordIds[
'newPageIdFirst'] = $newTableIds[static::TABLE_Page][0];
365 $newTableIds = $this->actionService->createNewRecord(static::TABLE_Page, $this->recordIds[
'newPageIdFirst'], array(
'title' =>
'Testing #2',
'hidden' => 0));
366 $this->recordIds[
'newPageIdSecond'] = $newTableIds[static::TABLE_Page][0];
369 $this->backendUser->workspace = 0;
371 $newTableIds = $this->actionService->copyRecord(static::TABLE_Page, static::VALUE_PageId, static::VALUE_PageIdTarget);
372 $this->recordIds[
'copiedPageId'] = $newTableIds[static::TABLE_Page][static::VALUE_PageId];
373 $this->recordIds[
'copiedPageIdFirst'] = $newTableIds[static::TABLE_Page][$this->recordIds[
'newPageIdFirst']];
374 $this->recordIds[
'copiedPageIdSecond'] = $newTableIds[static::TABLE_Page][$this->recordIds[
'newPageIdSecond']];
377 $this->backendUser->workspace = static::VALUE_WorkspaceId;