‪TYPO3CMS  10.4
ActionTest.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 
19 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
20 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
21 
26 {
30  protected ‪$assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/';
31 
35  public function ‪verifyCleanReferenceIndex()
36  {
37  // The test verifies the imported data set has a clean reference index by the check in tearDown()
38  self::assertTrue(true);
39  }
40 
45  public function ‪createParentContent()
46  {
47  parent::createParentContent();
48  $this->‪assertAssertionDataSet('createParentContent');
49 
50  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
51  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
52  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
53  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
54  }
55 
60  public function ‪modifyParentContent()
61  {
62  parent::modifyParentContent();
63  $this->‪assertAssertionDataSet('modifyParentContent');
64 
65  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
66  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
67  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
68  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
69  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
70  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
71  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
72  }
73 
78  public function ‪deleteParentContent()
79  {
80  parent::deleteParentContent();
81  $this->‪assertAssertionDataSet('deleteParentContent');
82 
83  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
84  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
85  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
86  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
87  }
88 
93  public function ‪copyParentContent()
94  {
95  parent::copyParentContent();
96  $this->‪assertAssertionDataSet('copyParentContent');
97 
98  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
99  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
100  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
101  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
102  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
103  }
104 
109  public function ‪copyParentContentToDifferentPage()
110  {
111  parent::copyParentContentToDifferentPage();
112  $this->‪assertAssertionDataSet('copyParentContentToDifferentPage');
113 
114  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
115  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
116  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
117  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
118  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
119  }
120 
126  {
127  // Create translated page first
128  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
129  parent::copyParentContentToLanguageWithAllChildren();
130  $this->‪assertAssertionDataSet('copyParentContentToLanguageWAllChildren');
131 
132  // Set up "dk" to not have overlays
133  $languageConfiguration = ‪$this->siteLanguageConfiguration;
134  $languageConfiguration[‪self::VALUE_LanguageId]['fallbackType'] = 'free';
135  $this->‪setUpFrontendSite(1, $languageConfiguration);
136  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
137  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
138  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
139  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
140  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
141  }
142 
148  {
149  // Create translated page first
150  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
151  parent::localizeParentContentWithAllChildren();
152  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
153 
154  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
155  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
156  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
157  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
158  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
159  }
160 
166  {
167  // Create translated page first
168  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
169  parent::localizeParentContentWithLanguageSynchronization();
170  $this->‪assertAssertionDataSet('localizeParentContentSynchronization');
171 
172  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
173  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
174  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
175  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
176  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
177  }
178 
184  {
185  // Create translated page first
186  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
187  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond);
188  parent::localizeParentContentChainLanguageSynchronizationSource();
189  $this->‪assertAssertionDataSet('localizeParentContentChainLanguageSynchronizationSource');
190 
191  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond));
192  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
193  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
194  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
195  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Hotel #1', '[Translate to Deutsch:] [Translate to Dansk:] Hotel #2'));
196  }
197 
203  {
204  // Create translated page first
205  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
206  parent::localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization();
207  $this->‪assertAssertionDataSet('localizeParentContentNCreateNestedChildrenWLanguageSynchronization');
208 
209  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
210  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
211  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
212  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
213  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] New Hotel #1'));
214  }
215 
221  {
222  // Create translated page first
223  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
224  parent::localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization();
225  // the assertion is the same as for localizeParentContentWithLanguageSynchronization()
226  $this->‪assertAssertionDataSet('localizeParentContentSynchronization');
227 
228  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
229  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
230  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
231  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
232  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
233  }
234 
240  {
241  // Create translated page first
242  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
243  parent::localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization();
244  // the assertion is the same as for localizeParentContentWithLanguageSynchronization()
245  $this->‪assertAssertionDataSet('localizeParentContentSynchronization');
246 
247  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
248  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
249  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
250  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
251  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
252  }
253 
258  public function ‪changeParentContentSorting()
259  {
260  parent::changeParentContentSorting();
261  $this->‪assertAssertionDataSet('changeParentContentSorting');
262 
263  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
264  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
265  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
266  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
267  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
268  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
269  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
270  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
271  }
272 
277  public function ‪moveParentContentToDifferentPage()
278  {
279  parent::moveParentContentToDifferentPage();
280  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
281 
282  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
283  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
284  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
285  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
286  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
287  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
288  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
289  }
290 
296  {
297  parent::moveParentContentToDifferentPageAndChangeSorting();
298  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
299 
300  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
301  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
302  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
303  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
304  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
305  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
306  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
307  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
308  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
309  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
310  }
311 
320  public function ‪modifyPage()
321  {
322  parent::modifyPage();
323  $this->‪assertAssertionDataSet('modifyPage');
324 
325  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
326  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
327  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
328  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
329  }
330 
335  public function ‪deletePage()
336  {
337  parent::deletePage();
338  $this->‪assertAssertionDataSet('deletePage');
339 
340  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
341  self::assertEquals(404, $response->getStatusCode());
342  }
343 
348  public function ‪copyPage()
349  {
350  parent::copyPage();
351  $this->‪assertAssertionDataSet('copyPage');
352 
353  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
354  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
355  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
356  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
357  }
358 
364  {
365  parent::copyPageWithHotelBeforeParentContent();
366  $this->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
367 
368  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
369  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
370  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
371  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
372  }
373 
383  {
384  parent::createParentContentWithHotelAndOfferChildren();
385  $this->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
386 
387  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
388  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
389  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
390  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
391  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
392  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
393  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
394  }
395 
401  {
402  parent::createAndCopyParentContentWithHotelAndOfferChildren();
403  $this->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
404 
405  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
406  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
407  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
408  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
409  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
410  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
411  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
412  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
413  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
414  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
415  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
416  }
417 
423  {
424  // Create translated page first
425  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
426  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
427  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
428 
429  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
430  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
431  // Content record gets overlaid, thus using newContentId
432  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
433  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
434  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
435  // Hotel record gets overlaid, thus using newHotelId
436  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
437  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
438  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
439  }
440 
447  {
448  // Create translated page first
449  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
450  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration();
451  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenWOSortBy');
452 
453  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
454  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
455  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
456  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
457  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
458  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
459  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
460  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
461  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
462  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
463  }
464 
469  public function ‪modifyOnlyHotelChild()
470  {
471  parent::modifyOnlyHotelChild();
472  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
473 
474  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
475  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
476  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
477  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
478  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
479  }
480 
486  {
487  parent::modifyParentAndChangeHotelChildrenSorting();
488  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
489 
490  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
491  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
492  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
493  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
494  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
495  }
496 
501  public function ‪modifyParentWithHotelChild()
502  {
503  parent::modifyParentWithHotelChild();
504  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
505 
506  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
507  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
508  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
509  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
510  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
511  }
512 
517  public function ‪modifyParentAndAddHotelChild()
518  {
519  parent::modifyParentAndAddHotelChild();
520  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
521 
522  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
523  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
524  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
525  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
526  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
527  }
528 
533  public function ‪modifyParentAndDeleteHotelChild()
534  {
535  parent::modifyParentAndDeleteHotelChild();
536  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
537 
538  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
539  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
540  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
541  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
542  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
543  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
544  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
545  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
546  }
547 
553  {
554  parent::localizePageWithLocalizationExclude();
555  $this->‪assertAssertionDataSet('localizePageWExclude');
556 
557  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
558  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
559  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
560  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
561  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
562  }
563 
569  {
570  parent::localizePageTwiceWithLocalizationExclude();
571  $this->‪assertAssertionDataSet('localizePageTwiceWExclude');
572 
573  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
574  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
575  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
576  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
577  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
578  }
579 
585  {
586  parent::localizePageAndAddHotelChildWithLocalizationExclude();
587  $this->‪assertAssertionDataSet('localizePageNAddHotelChildWExclude');
588 
589  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
590  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
591  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
592  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
593  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
594  }
595 
601  {
602  parent::localizePageWithLanguageSynchronization();
603  $this->‪assertAssertionDataSet('localizePageWSynchronization');
604 
605  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
606  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
607  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
608  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
609  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
610  }
611 
617  {
618  parent::localizePageAndAddHotelChildWithLanguageSynchronization();
619  $this->‪assertAssertionDataSet('localizePageNAddHotelChildWSynchronization');
620 
621  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
622  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
623  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
624  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
625  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0', '[Translate to Dansk:] Hotel #007'));
626  }
627 
633  {
634  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
635  $this->‪assertAssertionDataSet('localizePageNAddMonoglotHotelChildWSynchronization');
636 
637  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
638  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
639  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
640  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
641  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
642  }
643 
649  {
650  parent::localizeAndCopyPageWithLanguageSynchronization();
651  $this->‪assertAssertionDataSet('localizeNCopyPageWSynchronization');
652 
653  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
654  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
655  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
656  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
657  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
658  }
659 
668  {
669  parent::localizePageWithSynchronizationAndCustomLocalizedHotel();
670  $this->‪assertAssertionDataSet('localizePageWithSynchronizationAndCustomLocalizedHotel');
671 
672  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
673  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
674  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
675  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
676  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
677  }
678 
684  {
685  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
686  parent::copyPage();
687  $this->‪assertAssertionDataSet('localizePageAddMonoglotHotelChildNCopyPageWSynchronization');
688 
689  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
690  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
691  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
692  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
693  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
694  }
695 
699  public function ‪inlineLocalizeSynchronizeLocalizeMissing(): void
700  {
701  parent::inlineLocalizeSynchronizeLocalizeMissing();
702  $this->‪assertAssertionDataSet('inlineLocalizeSynchronizeLocalizeMissing');
703  }
704 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:34
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddHotelChildWithLanguageSynchronization
‪localizePageAndAddHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:615
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToLanguageWithAllChildren
‪copyParentContentToLanguageWithAllChildren()
Definition: ActionTest.php:124
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setUpFrontendSite
‪setUpFrontendSite(int $pageId, array $additionalLanguages=[])
Definition: AbstractDataHandlerActionTestCase.php:143
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:289
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify
Definition: ActionTest.php:16
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:305
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:347
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: ActionTest.php:599
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration
‪createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration()
Definition: ActionTest.php:445
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeAndCopyPageWithLanguageSynchronization
‪localizeAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:647
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddMonoglotHotelChildWithLanguageSynchronization
‪localizePageAndAddMonoglotHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:631
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:92
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:421
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:44
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:276
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithLanguageSynchronization
‪localizeParentContentWithLanguageSynchronization()
Definition: ActionTest.php:164
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithSynchronizationAndCustomLocalizedHotel
‪localizePageWithSynchronizationAndCustomLocalizedHotel()
Definition: ActionTest.php:666
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:313
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:319
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:77
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization
‪localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization()
Definition: ActionTest.php:201
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentChainLanguageSynchronizationSource
‪localizeParentContentChainLanguageSynchronizationSource()
Definition: ActionTest.php:182
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:399
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:29
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddHotelChildWithLocalizationExclude
‪localizePageAndAddHotelChildWithLocalizationExclude()
Definition: ActionTest.php:583
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:108
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:294
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:500
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:297
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageTwiceWithLocalizationExclude
‪localizePageTwiceWithLocalizationExclude()
Definition: ActionTest.php:567
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\$siteLanguageConfiguration
‪array $siteLanguageConfiguration
Definition: AbstractDataHandlerActionTestCase.php:86
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:516
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:532
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:25
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\inlineLocalizeSynchronizeLocalizeMissing
‪inlineLocalizeSynchronizeLocalizeMissing()
Definition: ActionTest.php:698
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:257
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization
‪localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:682
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithLocalizationExclude
‪localizePageWithLocalizationExclude()
Definition: ActionTest.php:551
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:59
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:146
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:468
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:362
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:381
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:35
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization()
Definition: ActionTest.php:219
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization()
Definition: ActionTest.php:238
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:484
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:334