‪TYPO3CMS  9.5
AbstractActionTestCase.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
18 
23 {
24  const ‪VALUE_PageId = 89;
35 
36  const ‪TABLE_Page = 'pages';
37  const ‪TABLE_Content = 'tt_content';
38  const ‪TABLE_Hotel = 'tx_irretutorial_1nff_hotel';
39  const ‪TABLE_Offer = 'tx_irretutorial_1nff_offer';
40  const ‪TABLE_Price = 'tx_irretutorial_1nff_price';
41 
42  const ‪FIELD_PageHotel = 'tx_irretutorial_hotels';
43  const ‪FIELD_ContentHotel = 'tx_irretutorial_1nff_hotels';
44  const ‪FIELD_HotelOffer = 'offers';
45  const ‪FIELD_OfferPrice = 'prices';
46 
50  protected ‪$scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/DataSet/';
51 
52  protected function ‪setUp()
53  {
54  parent::setUp();
55  $this->‪importScenarioDataSet('LiveDefaultPages');
56  $this->‪importScenarioDataSet('LiveDefaultElements');
57 
58  $this->setUpFrontendRootPage(
59  1,
60  [
61  'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript',
62  'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/ExtbaseJsonRenderer.typoscript',
63  ]
64  );
65  }
66 
74  public function ‪createParentContent()
75  {
76  $newTableIds = $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, ['header' => 'Testing #1']);
77  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
78  }
79 
83  public function ‪modifyParentContent()
84  {
85  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, ['header' => 'Testing #1']);
86  }
87 
91  public function ‪deleteParentContent()
92  {
93  $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
94  }
95 
99  public function ‪copyParentContent()
100  {
101  $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId);
102  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
103  }
104 
108  public function ‪copyParentContentToDifferentPage()
109  {
110  $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
111  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
112  }
113 
118  {
119  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
120  ‪$GLOBALS['TCA'][‪self::TABLE_Hotel]['columns'][‪self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = true;
121  ‪$GLOBALS['TCA'][‪self::TABLE_Offer]['columns'][‪self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = true;
122  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
123  $this->recordIds['localizedContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
124  }
125 
130  {
131  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
132  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
133  $this->recordIds['localizedContentIdFirst'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
134  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, $this->recordIds['localizedContentIdFirst'], self::VALUE_LanguageIdSecond);
135  $this->recordIds['localizedContentIdSecond'] = $newTableIds[‪self::TABLE_Content][$this->recordIds['localizedContentIdFirst']];
136  $this->actionService->modifyRecord(
137  self::TABLE_Content,
138  $this->recordIds['localizedContentIdSecond'],
139  ['l10n_state' => [self::FIELD_ContentHotel => 'source']]
140  );
141  $this->actionService->modifyRecords(
142  self::VALUE_PageId,
143  [
144  self::TABLE_Content => ['uid' => self::VALUE_ContentIdLast, self::FIELD_ContentHotel => '5,__nextUid'],
145  self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #2'],
146  ]
147  );
148  }
149 
154  {
155  $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
156  $this->recordIds['localizedContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
157  }
158 
163  {
164  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
165  $this->recordIds['localizedContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
166  }
167 
172  {
173  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
174  ‪$GLOBALS['TCA'][‪self::TABLE_Hotel]['columns'][‪self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = true;
175  ‪$GLOBALS['TCA'][‪self::TABLE_Offer]['columns'][‪self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = true;
176 
177  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
178  $this->recordIds['localizedContentIdFirst'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
179 
180  $newHotelId = ‪StringUtility::getUniqueId('NEW');
181  $newOfferId = ‪StringUtility::getUniqueId('NEW');
182  $newPriceId = ‪StringUtility::getUniqueId('NEW');
183  $dataMap = [
184  self::TABLE_Content => [
185  self::VALUE_ContentIdLast => [self::FIELD_ContentHotel => '5,' . $newHotelId],
186  ],
187  self::TABLE_Hotel => [
188  $newHotelId => ['pid' => ‪self::VALUE_PageId, 'title' => 'New Hotel #1', 'offers' => $newOfferId],
189  ],
190  self::TABLE_Offer => [
191  $newOfferId => ['pid' => ‪self::VALUE_PageId, 'title' => 'New Offer #1.1', 'prices' => $newPriceId],
192  ],
193  self::TABLE_Price => [
194  $newPriceId => ['pid' => ‪self::VALUE_PageId, 'title' => 'New Price #1.1.1'],
195  ],
196  ];
197  $this->actionService->invoke($dataMap, []);
198  $this->recordIds['newHoteId'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newHotelId];
199  $this->recordIds['newOfferId'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newOfferId];
200  $this->recordIds['newPriceId'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newPriceId];
201  }
202 
207  {
208  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
209  ‪$GLOBALS['TCA'][‪self::TABLE_Hotel]['columns'][‪self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = true;
210  ‪$GLOBALS['TCA'][‪self::TABLE_Offer]['columns'][‪self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = true;
211  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
212  $this->recordIds['localizedContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
213  // modify IRRE relation value of localized record (which should be sanitized and filtered)
214  $this->actionService->modifyRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], [self::FIELD_ContentHotel => '0']);
215  }
216 
221  {
222  // disable language synchronization
223  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = false;
224  ‪$GLOBALS['TCA'][‪self::TABLE_Hotel]['columns'][‪self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = false;
225  ‪$GLOBALS['TCA'][‪self::TABLE_Offer]['columns'][‪self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = false;
226  $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
227  $this->recordIds['localizedContentId'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
228  $this->recordIds['localizedHotelId'] = $newTableIds[‪self::TABLE_Hotel][‪self::VALUE_HotelIdThird];
229  $this->recordIds['localizedOfferId'] = $newTableIds[‪self::TABLE_Offer][‪self::VALUE_OfferIdLast];
230  // now enable language synchronization
231  ‪$GLOBALS['TCA'][‪self::TABLE_Content]['columns'][‪self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
232  ‪$GLOBALS['TCA'][‪self::TABLE_Hotel]['columns'][‪self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = true;
233  ‪$GLOBALS['TCA'][‪self::TABLE_Offer]['columns'][‪self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = true;
234  // modify IRRE relation values of localized records (which should be sanitized and filtered)
235  $this->actionService->modifyRecords(
236  self::VALUE_PageId,
237  [
238  self::TABLE_Content => ['uid' => $this->recordIds['localizedContentId'], self::FIELD_ContentHotel => '0'],
239  self::TABLE_Hotel => ['uid' => $this->recordIds['localizedHotelId'], self::FIELD_ContentHotel => '0'],
240  self::TABLE_Offer => ['uid' => $this->recordIds['localizedOfferId'], self::FIELD_ContentHotel => '0'],
241  ]
242  );
243  }
244 
248  public function ‪changeParentContentSorting()
249  {
250  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
251  }
252 
256  public function ‪moveParentContentToDifferentPage()
257  {
258  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
259  }
260 
265  {
266  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
267  $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
268  }
269 
277  public function ‪modifyPage()
278  {
279  $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, ['title' => 'Testing #1']);
280  }
281 
285  public function ‪deletePage()
286  {
287  $this->actionService->deleteRecord(self::TABLE_Page, self::VALUE_PageId);
288  }
289 
293  public function ‪copyPage()
294  {
295  $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
296  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
297  $this->recordIds['newContentIdFirst'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdFirst];
298  $this->recordIds['newContentIdLast'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
299  }
300 
305  {
306  // Ensure hotels get processed first
307  ‪$GLOBALS['TCA'] = array_merge(
308  [self::TABLE_Hotel => ‪$GLOBALS['TCA'][self::TABLE_Hotel]],
309  ‪$GLOBALS['TCA']
310  );
311 
312  $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
313  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
314  $this->recordIds['newContentIdFirst'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdFirst];
315  $this->recordIds['newContentIdLast'] = $newTableIds[‪self::TABLE_Content][‪self::VALUE_ContentIdLast];
316  }
317 
326  {
327  $newTableIds = $this->actionService->createNewRecords(
328  self::VALUE_PageId,
329  [
330  self::TABLE_Content => ['header' => 'Testing #1', self::FIELD_ContentHotel => '__nextUid'],
331  self::TABLE_Hotel => ['title' => 'Hotel #1', self::FIELD_HotelOffer => '__nextUid'],
332  self::TABLE_Offer => ['title' => 'Offer #1'],
333  ]
334  );
335  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
336  }
337 
342  {
343  $newTableIds = $this->actionService->createNewRecords(
344  self::VALUE_PageId,
345  [
346  self::TABLE_Content => ['header' => 'Testing #1', self::FIELD_ContentHotel => '__nextUid'],
347  self::TABLE_Hotel => ['title' => 'Hotel #1', self::FIELD_HotelOffer => '__nextUid'],
348  self::TABLE_Offer => ['title' => 'Offer #1'],
349  ]
350  );
351  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
352  $this->recordIds['newHotelId'] = $newTableIds[‪self::TABLE_Hotel][0];
353  $copiedTableIds = $this->actionService->copyRecord(self::TABLE_Content, $this->recordIds['newContentId'], self::VALUE_PageId);
354  $this->recordIds['copiedContentId'] = $copiedTableIds[‪self::TABLE_Content][$this->recordIds['newContentId']];
355  $this->recordIds['copiedHotelId'] = $copiedTableIds[‪self::TABLE_Hotel][$this->recordIds['newHotelId']];
356  }
357 
362  {
363  $newTableIds = $this->actionService->createNewRecords(
364  self::VALUE_PageId,
365  [
366  self::TABLE_Content => ['header' => 'Testing #1', self::FIELD_ContentHotel => '__nextUid'],
367  self::TABLE_Hotel => ['title' => 'Hotel #1', self::FIELD_HotelOffer => '__nextUid'],
368  self::TABLE_Offer => ['title' => 'Offer #1'],
369  ]
370  );
371  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
372  $this->recordIds['newHotelId'] = $newTableIds[‪self::TABLE_Hotel][0];
373  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, $this->recordIds['newContentId'], self::VALUE_LanguageId);
374  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][$this->recordIds['newContentId']];
375  }
376 
381  {
382  unset(‪$GLOBALS['TCA'][self::TABLE_Hotel]['ctrl']['sortby']);
383  $newTableIds = $this->actionService->createNewRecords(
384  self::VALUE_PageId,
385  [
386  self::TABLE_Content => ['header' => 'Testing #1', self::FIELD_ContentHotel => '__nextUid'],
387  self::TABLE_Hotel => ['title' => 'Hotel #1', self::FIELD_HotelOffer => '__nextUid'],
388  self::TABLE_Offer => ['title' => 'Offer #1'],
389  ]
390  );
391  $this->recordIds['newContentId'] = $newTableIds[‪self::TABLE_Content][0];
392  $this->recordIds['newHotelId'] = $newTableIds[‪self::TABLE_Hotel][0];
393  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Content, $this->recordIds['newContentId'], self::VALUE_LanguageId);
394  $this->recordIds['localizedContentId'] = $localizedTableIds[‪self::TABLE_Content][$this->recordIds['newContentId']];
395  }
396 
400  public function ‪modifyOnlyHotelChild()
401  {
402  $this->actionService->modifyRecord(self::TABLE_Hotel, 4, ['title' => 'Testing #1']);
403  }
404 
409  {
410  $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, [self::FIELD_ContentHotel => '4,3']);
411  }
412 
416  public function ‪modifyParentWithHotelChild()
417  {
418  $this->actionService->modifyRecords(
419  self::VALUE_PageId,
420  [
421  self::TABLE_Content => ['uid' => self::VALUE_ContentIdFirst, self::FIELD_ContentHotel => '3,4'],
422  self::TABLE_Hotel => ['uid' => 4, 'title' => 'Testing #1'],
423  ]
424  );
425  }
426 
430  public function ‪modifyParentAndAddHotelChild()
431  {
432  $this->actionService->modifyRecords(
433  self::VALUE_PageId,
434  [
435  self::TABLE_Content => ['uid' => self::VALUE_ContentIdLast, self::FIELD_ContentHotel => '5,__nextUid'],
436  self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #2'],
437  ]
438  );
439  }
440 
444  public function ‪modifyParentAndDeleteHotelChild()
445  {
446  $this->actionService->modifyRecord(
447  self::TABLE_Content,
448  self::VALUE_ContentIdFirst,
449  [self::FIELD_ContentHotel => '3'],
450  [self::TABLE_Hotel => [4]]
451  );
452  }
453 
455  {
456  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['l10n_mode'] = 'exclude';
457  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
458  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
459  }
460 
462  {
463  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['l10n_mode'] = 'exclude';
464  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
465  $this->recordIds['localizedPageIdFirst'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
466  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond);
467  $this->recordIds['localizedPageIdSecond'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
468  }
469 
471  {
472  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['l10n_mode'] = 'exclude';
473  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
474  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
475  $this->actionService->modifyRecords(
476  self::VALUE_PageId,
477  [
478  self::TABLE_Page => ['uid' => self::VALUE_PageId, self::FIELD_PageHotel => '2,__nextUid'],
479  self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #007'],
480  ]
481  );
482  }
483 
485  {
486  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
487  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
488  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
489  }
490 
492  {
493  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
494  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
495  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
496  $this->actionService->modifyRecords(
497  self::VALUE_PageId,
498  [
499  self::TABLE_Page => ['uid' => self::VALUE_PageId, self::FIELD_PageHotel => '2,__nextUid'],
500  self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #007'],
501  ]
502  );
503  }
504 
506  {
507  unset(‪$GLOBALS['TCA'][self::TABLE_Hotel]['ctrl']['languageField']);
508  unset(‪$GLOBALS['TCA'][self::TABLE_Hotel]['ctrl']['transOrigPointerField']);
509  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
510  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
511  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
512  $this->actionService->modifyRecords(
513  self::VALUE_PageId,
514  [
515  self::TABLE_Page => ['uid' => self::VALUE_PageId, self::FIELD_PageHotel => '2,__nextUid'],
516  self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #007'],
517  ]
518  );
519  }
520 
522  {
523  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
524  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
525  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
526  $newTableIds = $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
527  $this->recordIds['newPageId'] = $newTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
528  }
529 
531  {
532  ‪$GLOBALS['TCA'][‪self::TABLE_Page]['columns'][‪self::FIELD_PageHotel]['config']['behaviour']['allowLanguageSynchronization'] = true;
533  $localizedTableIds = $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
534  $this->recordIds['localizedPageId'] = $localizedTableIds[‪self::TABLE_Page][‪self::VALUE_PageId];
535  // Using "localized page ID" on purpose because BE editing uses a "page" record and data handler
536  $this->actionService->modifyRecords(
537  $this->recordIds['localizedPageId'],
538  [
539  self::TABLE_Page => ['uid' => $this->recordIds['localizedPageId'], self::FIELD_PageHotel => '6,__nextUid', 'l10n_state' => [self::FIELD_PageHotel => 'custom']],
540  self::TABLE_Hotel => ['uid' => '__NEW', 'sys_language_uid' => self::VALUE_LanguageId, 'title' => 'Hotel in dansk page only'],
541  ]
542  );
543  }
544 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: AbstractActionTestCase.php:303
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentWithLanguageSynchronization
‪localizeParentContentWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:116
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\TABLE_Hotel
‪const TABLE_Hotel
Definition: AbstractActionTestCase.php:38
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\TABLE_Offer
‪const TABLE_Offer
Definition: AbstractActionTestCase.php:39
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_OfferIdLast
‪const VALUE_OfferIdLast
Definition: AbstractActionTestCase.php:32
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\setUp
‪setUp()
Definition: AbstractActionTestCase.php:51
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\TABLE_Content
‪const TABLE_Content
Definition: AbstractActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: AbstractActionTestCase.php:263
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration
‪createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration()
Definition: AbstractActionTestCase.php:379
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\copyParentContentToLanguageWithAllChildren
‪copyParentContentToLanguageWithAllChildren()
Definition: AbstractActionTestCase.php:152
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\FIELD_HotelOffer
‪const FIELD_HotelOffer
Definition: AbstractActionTestCase.php:44
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_LanguageIdSecond
‪const VALUE_LanguageIdSecond
Definition: AbstractActionTestCase.php:34
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\TABLE_Price
‪const TABLE_Price
Definition: AbstractActionTestCase.php:40
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:205
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: AbstractActionTestCase.php:415
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\FIELD_OfferPrice
‪const FIELD_OfferPrice
Definition: AbstractActionTestCase.php:45
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_PageIdWebsite
‪const VALUE_PageIdWebsite
Definition: AbstractActionTestCase.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: AbstractActionTestCase.php:161
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\deletePage
‪deletePage()
Definition: AbstractActionTestCase.php:284
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageTwiceWithLocalizationExclude
‪localizePageTwiceWithLocalizationExclude()
Definition: AbstractActionTestCase.php:460
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\FIELD_PageHotel
‪const FIELD_PageHotel
Definition: AbstractActionTestCase.php:42
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\changeParentContentSorting
‪changeParentContentSorting()
Definition: AbstractActionTestCase.php:247
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentChainLanguageSynchronizationSource
‪localizeParentContentChainLanguageSynchronizationSource()
Definition: AbstractActionTestCase.php:128
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: AbstractActionTestCase.php:443
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\FIELD_ContentHotel
‪const FIELD_ContentHotel
Definition: AbstractActionTestCase.php:43
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyParentContent
‪modifyParentContent()
Definition: AbstractActionTestCase.php:82
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\copyParentContent
‪copyParentContent()
Definition: AbstractActionTestCase.php:98
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\TABLE_Page
‪const TABLE_Page
Definition: AbstractActionTestCase.php:36
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageAndAddHotelChildWithLanguageSynchronization
‪localizePageAndAddHotelChildWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:490
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: AbstractActionTestCase.php:340
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\deleteParentContent
‪deleteParentContent()
Definition: AbstractActionTestCase.php:90
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: AbstractActionTestCase.php:429
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
Definition: AbstractDataHandlerActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: AbstractActionTestCase.php:255
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeAndCopyPageWithLanguageSynchronization
‪localizeAndCopyPageWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:520
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:483
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\copyPage
‪copyPage()
Definition: AbstractActionTestCase.php:292
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField
Definition: AbstractActionTestCase.php:2
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_ContentIdLast
‪const VALUE_ContentIdLast
Definition: AbstractActionTestCase.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_PageId
‪const VALUE_PageId
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageAndAddMonoglotHotelChildWithLanguageSynchronization
‪localizePageAndAddMonoglotHotelChildWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:504
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization
‪localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization()
Definition: AbstractActionTestCase.php:170
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageWithLocalizationExclude
‪localizePageWithLocalizationExclude()
Definition: AbstractActionTestCase.php:453
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization()
Definition: AbstractActionTestCase.php:219
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: AbstractActionTestCase.php:399
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: AbstractActionTestCase.php:407
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_HotelIdSecond
‪const VALUE_HotelIdSecond
Definition: AbstractActionTestCase.php:30
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:91
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: AbstractActionTestCase.php:107
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_HotelIdFirst
‪const VALUE_HotelIdFirst
Definition: AbstractActionTestCase.php:29
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\modifyPage
‪modifyPage()
Definition: AbstractActionTestCase.php:276
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:23
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\createParentContent
‪createParentContent()
Definition: AbstractActionTestCase.php:73
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_PageIdTarget
‪const VALUE_PageIdTarget
Definition: AbstractActionTestCase.php:25
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\$scenarioDataSetDirectory
‪string $scenarioDataSetDirectory
Definition: AbstractActionTestCase.php:49
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: AbstractActionTestCase.php:360
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:21
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_ContentIdFirst
‪const VALUE_ContentIdFirst
Definition: AbstractActionTestCase.php:27
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_HotelIdThird
‪const VALUE_HotelIdThird
Definition: AbstractActionTestCase.php:31
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\importScenarioDataSet
‪importScenarioDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:117
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageWithSynchronizationAndCustomLocalizedHotel
‪localizePageWithSynchronizationAndCustomLocalizedHotel()
Definition: AbstractActionTestCase.php:529
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\localizePageAndAddHotelChildWithLocalizationExclude
‪localizePageAndAddHotelChildWithLocalizationExclude()
Definition: AbstractActionTestCase.php:469
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: AbstractActionTestCase.php:324