‪TYPO3CMS  10.4
AbstractActionTestCase.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 
23 
28 {
30  const ‪VALUE_PageId = 89;
41 
42  const ‪TABLE_Page = 'pages';
43  const ‪TABLE_Content = 'tt_content';
44 
48  protected ‪$scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/';
49 
50  protected function ‪setUp(): void
51  {
52  parent::setUp();
53  $this->‪importScenarioDataSet('LiveDefaultPages');
54  $this->‪importScenarioDataSet('LiveDefaultElements');
55 
56  $this->‪setUpFrontendSite(1, $this->siteLanguageConfiguration);
57  $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']);
58  $this->‪setWorkspaceId(0);
59  }
60 
68  public function ‪createContents()
69  {
70  // Creating record at the beginning of the page
71  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, ['header' => 'Testing #1']);
72  $this->recordIds['newContentIdFirst'] = $newTableIds[‪self::TABLE_Content][0];
73  // Creating record at the end of the page (after last one)
74  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, -self::VALUE_ContentIdSecond, ['header' => 'Testing #2']);
75  $this->recordIds['newContentIdLast'] = $newTableIds[‪self::TABLE_Content][0];
76  }
77 
83  public function ‪createContentForLanguageAll()
84  {
85  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, ['header' => 'Language set to all', 'sys_language_uid' => -1]);
86  $this->recordIds['newContentLanguageAll'] = $newTableIds[‪self::TABLE_Content][0];
87  }
88 
89  public function ‪modifyContent()
90  {
91  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['header' => 'Testing #1']);
92  }
93 
94  public function ‪hideContent()
95  {
96  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['hidden' => '1']);
97  }
98 
99  public function ‪deleteContent()
100  {
101  $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdSecond);
102  }
103 
105  {
106  $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized);
107  $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdThird);
108  }
109 
110  public function ‪copyContent()
111  {
112  $copiedTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageId);
113  $this->recordIds['copiedContentId'] = $copiedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
114  }
115 
116  public function ‪copyContentToLanguage()
117  {
118  $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
119  $this->recordIds['localizedContentId'] = $copiedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
120  }
121 
126  {
127  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['config']['behaviour']['allowLanguageSynchronization'] = true;
128  $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
129  $this->recordIds['localizedContentId'] = $copiedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
130  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['header' => 'Testing #1']);
131  }
132 
137  {
138  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['l10n_mode'] = 'exclude';
139  $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
140  $this->recordIds['localizedContentId'] = $copiedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
141  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['header' => 'Testing #1']);
142  }
143 
148  {
149  $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
150  $this->recordIds['localizedContentId'] = $copiedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdThirdLocalized];
151  }
152 
156  public function ‪copyPasteContent()
157  {
158  $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageId, ['header' => 'Testing #1']);
159  }
160 
161  public function ‪localizeContent()
162  {
163  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
164  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
165  }
166 
167  public function ‪localizeContentWithHideAtCopy()
168  {
169  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['ctrl']['hideAtCopy'] = true;
171  $this->actionService->modifyRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], ['hidden' => 0]);
172  }
173 
178  {
179  $integrityFieldNames = [
180  'origin' => ‪$GLOBALS['TCA'][‪self::TABLE_Content]['ctrl']['origUid'] ?? null,
181  'language' => ‪$GLOBALS['TCA'][‪self::TABLE_Content]['ctrl']['languageField'] ?? null,
182  'languageParent' => ‪$GLOBALS['TCA'][‪self::TABLE_Content]['ctrl']['transOrigPointerField'] ?? null,
183  'languageSource' => ‪$GLOBALS['TCA'][‪self::TABLE_Content]['ctrl']['translationSource'] ?? null,
184  ];
185  // explicitly unset integrity columns in TCA
186  foreach ($integrityFieldNames as $integrityFieldName) {
187  unset(‪$GLOBALS['TCA'][self::TABLE_Content]['columns'][$integrityFieldName]);
188  }
189  // After TCA changes, refindex is not ok anymore for imported rows. Update it before performing other actions.
190  $referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
191  $referenceIndex->updateIndex(false);
192 
193  // explicitly call TcaMigration (which was executed already earlier in functional testing bootstrap)
194  ‪$GLOBALS['TCA'] = (new TcaMigration())->migrate(‪$GLOBALS['TCA']);
195  // create translated page first
196  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
197  // perform actions to be tested
198  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
199  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
200  }
201 
203  {
204  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['config']['behaviour']['allowLanguageSynchronization'] = true;
205  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
206  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
207  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['header' => 'Testing #1']);
208  }
209 
211  {
212  ‪$GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['eval'] = 'null';
213  ‪$GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['behaviour']['allowLanguageSynchronization'] = true;
214  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, ['bodytext' => null]);
216  }
217 
219  {
220  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
221  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdThirdLocalized];
222  }
223 
225  {
226  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['config']['behaviour']['allowLanguageSynchronization'] = true;
227  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
228  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdThirdLocalized];
229  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdThird, ['header' => 'Testing #1']);
230  }
231 
233  {
234  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['config']['behaviour']['allowLanguageSynchronization'] = true;
235  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, self::VALUE_LanguageIdSecond);
236  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdThirdLocalized];
237  $this->actionService->modifyRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], ['l10n_state' => ['header' => 'source']]);
238  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdThird, ['header' => 'Testing #1']);
239  }
240 
247  public function ‪localizeContentAfterMovedContent()
248  {
249  // Create translated page first
250  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
251  // Default language element 310 on page 90 that has two 'free mode' localizations is moved to page 89.
252  // Note the two localizations are NOT moved along with the default language element, due to free mode.
253  // Note l10n_source of first localization 311 is kept and still points to 310, even though 310 is moved to different page.
254  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFreeMode, self::VALUE_PageId);
255  // Create new record after (relative to) previously moved one.
256  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, -self::VALUE_ContentIdFreeMode, ['header' => 'Testing #1']);
257  $this->recordIds['newContentIdLast'] = $newTableIds[‪self::TABLE_Content][0];
258  // Localize this new record
259  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, $newTableIds[self::TABLE_Content][0], self::VALUE_LanguageId);
260  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][$newTableIds[‪self::TABLE_Content][0]];
261  }
262 
263  public function ‪createLocalizedContent()
264  {
265  $newContentIdDefault = ‪StringUtility::getUniqueId('NEW');
266  $newContentIdLocalized = ‪StringUtility::getUniqueId('NEW');
267  $dataMap = [
268  self::TABLE_Content => [
269  $newContentIdDefault => ['pid' => ‪self::VALUE_PageId, 'header' => 'Testing'],
270  $newContentIdLocalized => ['pid' => ‪self::VALUE_PageId, 'header' => 'Localized Testing', 'sys_language_uid' => ‪self::VALUE_LanguageId, 'l18n_parent' => $newContentIdDefault, 'l10n_source' => $newContentIdDefault],
271  ]
272  ];
273  $this->actionService->invoke($dataMap, []);
274  $this->recordIds['newContentIdDefault'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newContentIdDefault];
275  $this->recordIds['newContentIdLocalized'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newContentIdLocalized];
276  }
277 
279  {
280  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['config']['behaviour']['allowLanguageSynchronization'] = true;
282  }
283 
285  {
286  ‪$GLOBALS['TCA']['tt_content']['columns']['header']['l10n_mode'] = 'exclude';
288  }
289 
290  public function ‪changeContentSorting()
291  {
292  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
293  }
294 
295  public function ‪changeContentSortingAfterSelf()
296  {
297  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdFirst);
298  }
299 
300  public function ‪moveContentToDifferentPage()
301  {
302  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget);
303  }
304 
308  public function ‪movePasteContentToDifferentPage()
309  {
310  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget, ['header' => 'Testing #1']);
311  }
312 
314  {
315  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget);
316  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdSecond);
317  }
318 
319  public function ‪moveContentToDifferentPageAndHide()
320  {
321  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_PageIdTarget, ['hidden' => '1']);
322  }
323 
331  public function ‪createPage()
332  {
333  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1', 'hidden' => 0, 'nav_title' => 'Nav Testing #1']);
334  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][0];
335  }
336 
338  {
339  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1', 'hidden' => 0]);
340  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][0];
341  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, $this->recordIds['newPageId'], ['title' => 'Testing #1 #1', 'hidden' => 0]);
342  $this->recordIds['newSubPageId'] = $newTableIds[‪self::TABLE_Page][0];
343  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, $this->recordIds['newSubPageId'], ['header' => 'Testing #1 #1', 'hidden' => 0]);
344  $this->recordIds['newSubPageContentId'] = $newTableIds[‪self::TABLE_Content][0];
345  }
346 
351  public function ‪createPageAndChangePageSorting()
352  {
353  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, 88, ['title' => 'Testing #1', 'hidden' => 0, 'nav_title' => 'Nav Testing #1']);
354  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][0];
355  $this->actionService->moveRecord(self::TABLE_Page, $this->recordIds['newPageId'], -self::VALUE_PageId);
356  }
357 
361  public function ‪createPageAndMoveCreatedPage()
362  {
363  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1', 'hidden' => 0, 'nav_title' => 'Nav Testing #1']);
364  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][0];
365  $this->actionService->moveRecord(self::TABLE_Page, $this->recordIds['newPageId'], -self::VALUE_PageId);
366  }
367 
369  {
370  $newTableIds = $this->actionService->createNewRecords(
371  self::VALUE_PageId,
372  [
373  self::TABLE_Page => ['title' => 'Testing #1'],
374  self::TABLE_Content => ['pid' => '__previousUid', 'header' => 'Testing #1']
375  ]
376  );
377  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][0];
378  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
379  }
380 
381  public function ‪modifyPage()
382  {
383  $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1']);
384  }
385 
386  public function ‪deletePage()
387  {
388  $this->actionService->deleteRecord(self::TABLE_Page, self::VALUE_PageId);
389  }
390 
391  public function ‪copyPage()
392  {
393  $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
394  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
395  $this->recordIds['newContentIdFirst'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdFirst];
396  $this->recordIds['newContentIdLast'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
397  }
398 
399  public function ‪copyPageFreeMode()
400  {
401  $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdTarget);
402  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][‪self::VALUE_PageIdTarget];
403  }
404 
405  public function ‪localizePage()
406  {
407  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
408  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
409  }
410 
412  {
413  unset(‪$GLOBALS['TCA'][self::TABLE_Page]['columns']['title']['l10n_mode']);
414  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns']['title']['config']['behaviour']['allowLanguageSynchronization'] = true;
415  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
416  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
417  $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1']);
418  }
419 
421  {
422  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
423  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
424  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
425  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
426  // Deleting the localized page should also delete its localized records
427  $this->actionService->deleteRecord(self::TABLE_Page, $this->recordIds['localizedPageId']);
428  }
429 
430  public function ‪localizeNestedPagesAndContents()
431  {
432  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageIdParent, self::VALUE_LanguageId);
433  $this->recordIds['localizedParentPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageIdParent];
434  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdParent, self::VALUE_LanguageId);
435  $this->recordIds['localizedParentContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdParent];
436  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
437  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
438  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
439  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdSecond];
440  // Have another localized content element on page 88 to verify it's translation is also properly discarded in workspaces
441  $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdParent, self::VALUE_PageIdParent);
442  }
443 
444  public function ‪changePageSorting()
445  {
446  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
447  }
448 
449  public function ‪changePageSortingAfterSelf()
450  {
451  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageId);
452  }
453 
454  public function ‪movePageToDifferentPage()
455  {
456  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
457  }
458 
459  public function ‪movePageToDifferentPageTwice()
460  {
461  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
462  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdWebsite);
463  }
464 
471  {
472  // Localize page first. In workspaces, this localization is created within ws, creating a "new" t3ver_state=-1 record
473  $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
474  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
475  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdWebsite);
476  }
477 
487  {
488  $this->‪setWorkspaceId(0);
489  $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
490  $this->‪setWorkspaceId(static::VALUE_WorkspaceId);
491  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
492  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdWebsite);
493  }
494 
505  {
506  $this->‪setWorkspaceId(0);
507  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
508  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
509  $this->‪setWorkspaceId(static::VALUE_WorkspaceId);
510  $this->actionService->modifyRecord(self::TABLE_Page, $this->recordIds['localizedPageId'], ['title' => 'Testing #1']);
511  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
512  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdWebsite);
513  }
514 
526  {
527  $this->‪setWorkspaceId(0);
528  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
529  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
530  $this->‪setWorkspaceId(static::VALUE_WorkspaceId);
531  $this->actionService->deleteRecord(self::TABLE_Page, $this->recordIds['localizedPageId']);
532  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
533  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdWebsite);
534  }
535 
537  {
538  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdWebsite);
539  $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
540  }
541 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentFromNonDefaultLanguage
‪localizeContentFromNonDefaultLanguage()
Definition: AbstractActionTestCase.php:217
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createPage
‪createPage()
Definition: AbstractActionTestCase.php:330
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdThirdLocalized
‪const VALUE_ContentIdThirdLocalized
Definition: AbstractActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\moveContentToDifferentPageAndChangeSorting
‪moveContentToDifferentPageAndChangeSorting()
Definition: AbstractActionTestCase.php:312
‪TYPO3\CMS\Core\Migrations\TcaMigration
Definition: TcaMigration.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizePage
‪localizePage()
Definition: AbstractActionTestCase.php:404
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setUpFrontendSite
‪setUpFrontendSite(int $pageId, array $additionalLanguages=[])
Definition: AbstractDataHandlerActionTestCase.php:143
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_PageIdTarget
‪const VALUE_PageIdTarget
Definition: AbstractActionTestCase.php:31
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentWithLanguageSynchronizationHavingNullValue
‪localizeContentWithLanguageSynchronizationHavingNullValue()
Definition: AbstractActionTestCase.php:209
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageToDifferentPage
‪movePageToDifferentPage()
Definition: AbstractActionTestCase.php:453
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePasteContentToDifferentPage
‪movePasteContentToDifferentPage()
Definition: AbstractActionTestCase.php:307
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\$scenarioDataSetDirectory
‪string $scenarioDataSetDirectory
Definition: AbstractActionTestCase.php:47
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentFromNonDefaultLanguageWithLanguageSynchronizationSource
‪localizeContentFromNonDefaultLanguageWithLanguageSynchronizationSource()
Definition: AbstractActionTestCase.php:231
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice
‪movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice()
Definition: AbstractActionTestCase.php:524
‪TYPO3\CMS\Core\Database\ReferenceIndex
Definition: ReferenceIndex.php:48
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\TABLE_Content
‪const TABLE_Content
Definition: AbstractActionTestCase.php:43
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyContentToLanguageFromNonDefaultLanguage
‪copyContentToLanguageFromNonDefaultLanguage()
Definition: AbstractActionTestCase.php:146
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyContentToLanguageWithLanguageSynchronization
‪copyContentToLanguageWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:124
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\setUp
‪setUp()
Definition: AbstractActionTestCase.php:49
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:39
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice
‪movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice()
Definition: AbstractActionTestCase.php:503
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createPageAndMoveCreatedPage
‪createPageAndMoveCreatedPage()
Definition: AbstractActionTestCase.php:360
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyContentToLanguageWithLocalizationExclude
‪copyContentToLanguageWithLocalizationExclude()
Definition: AbstractActionTestCase.php:135
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\hideContent
‪hideContent()
Definition: AbstractActionTestCase.php:93
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentFromNonDefaultLanguageWithLanguageSynchronizationDefault
‪localizeContentFromNonDefaultLanguageWithLanguageSynchronizationDefault()
Definition: AbstractActionTestCase.php:223
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyPageFreeMode
‪copyPageFreeMode()
Definition: AbstractActionTestCase.php:398
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\moveContentToDifferentPage
‪moveContentToDifferentPage()
Definition: AbstractActionTestCase.php:299
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyContentToLanguage
‪copyContentToLanguage()
Definition: AbstractActionTestCase.php:115
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\changePageSorting
‪changePageSorting()
Definition: AbstractActionTestCase.php:443
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
Definition: AbstractDataHandlerActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyPage
‪copyPage()
Definition: AbstractActionTestCase.php:390
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdFreeMode
‪const VALUE_ContentIdFreeMode
Definition: AbstractActionTestCase.php:38
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_LanguageIdSecond
‪const VALUE_LanguageIdSecond
Definition: AbstractActionTestCase.php:40
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentWithEmptyTcaIntegrityColumns
‪localizeContentWithEmptyTcaIntegrityColumns()
Definition: AbstractActionTestCase.php:176
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\deletePage
‪deletePage()
Definition: AbstractActionTestCase.php:385
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdFirst
‪const VALUE_ContentIdFirst
Definition: AbstractActionTestCase.php:34
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdSecond
‪const VALUE_ContentIdSecond
Definition: AbstractActionTestCase.php:35
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\changePageSortingAfterSelf
‪changePageSortingAfterSelf()
Definition: AbstractActionTestCase.php:448
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\changeContentSortingAfterSelf
‪changeContentSortingAfterSelf()
Definition: AbstractActionTestCase.php:294
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\moveContentToDifferentPageAndHide
‪moveContentToDifferentPageAndHide()
Definition: AbstractActionTestCase.php:318
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\deleteContent
‪deleteContent()
Definition: AbstractActionTestCase.php:98
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentWithLanguageSynchronization
‪localizeContentWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:201
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\TABLE_Page
‪const TABLE_Page
Definition: AbstractActionTestCase.php:42
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setWorkspaceId
‪setWorkspaceId(int $workspaceId)
Definition: AbstractDataHandlerActionTestCase.php:182
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createContents
‪createContents()
Definition: AbstractActionTestCase.php:67
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyPasteContent
‪copyPasteContent()
Definition: AbstractActionTestCase.php:155
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageLocalizedToDifferentPageTwice
‪movePageLocalizedToDifferentPageTwice()
Definition: AbstractActionTestCase.php:469
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase
Definition: AbstractActionTestCase.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeNestedPagesAndContents
‪localizeNestedPagesAndContents()
Definition: AbstractActionTestCase.php:429
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageToDifferentPageTwice
‪movePageToDifferentPageTwice()
Definition: AbstractActionTestCase.php:458
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizePageAndContentsAndDeletePageLocalization
‪localizePageAndContentsAndDeletePageLocalization()
Definition: AbstractActionTestCase.php:419
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular
Definition: AbstractActionTestCase.php:16
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\modifyPage
‪modifyPage()
Definition: AbstractActionTestCase.php:380
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createPageAndSubPageAndSubPageContent
‪createPageAndSubPageAndSubPageContent()
Definition: AbstractActionTestCase.php:336
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:410
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\deleteLocalizedContentAndDeleteContent
‪deleteLocalizedContentAndDeleteContent()
Definition: AbstractActionTestCase.php:103
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createPageAndContentWithTcaDefaults
‪createPageAndContentWithTcaDefaults()
Definition: AbstractActionTestCase.php:367
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdParent
‪const VALUE_ContentIdParent
Definition: AbstractActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createLocalizedContentWithLocalizationExclude
‪createLocalizedContentWithLocalizationExclude()
Definition: AbstractActionTestCase.php:283
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentAfterMovedContent
‪localizeContentAfterMovedContent()
Definition: AbstractActionTestCase.php:246
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContentWithHideAtCopy
‪localizeContentWithHideAtCopy()
Definition: AbstractActionTestCase.php:166
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_PageIdWebsite
‪const VALUE_PageIdWebsite
Definition: AbstractActionTestCase.php:32
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\copyContent
‪copyContent()
Definition: AbstractActionTestCase.php:109
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\localizeContent
‪localizeContent()
Definition: AbstractActionTestCase.php:160
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_PageIdParent
‪const VALUE_PageIdParent
Definition: AbstractActionTestCase.php:29
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_PageId
‪const VALUE_PageId
Definition: AbstractActionTestCase.php:30
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createContentForLanguageAll
‪createContentForLanguageAll()
Definition: AbstractActionTestCase.php:82
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createLocalizedContentWithLanguageSynchronization
‪createLocalizedContentWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:277
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createPageAndChangePageSorting
‪createPageAndChangePageSorting()
Definition: AbstractActionTestCase.php:350
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\createLocalizedContent
‪createLocalizedContent()
Definition: AbstractActionTestCase.php:262
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\VALUE_ContentIdThird
‪const VALUE_ContentIdThird
Definition: AbstractActionTestCase.php:36
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\modifyContent
‪modifyContent()
Definition: AbstractActionTestCase.php:88
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageLocalizedInLiveToDifferentPageTwice
‪movePageLocalizedInLiveToDifferentPageTwice()
Definition: AbstractActionTestCase.php:485
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\changeContentSorting
‪changeContentSorting()
Definition: AbstractActionTestCase.php:289
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase\movePageToDifferentPageAndChangeSorting
‪movePageToDifferentPageAndChangeSorting()
Definition: AbstractActionTestCase.php:535
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\importScenarioDataSet
‪importScenarioDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:201