‪TYPO3CMS  11.5
ActionTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
22 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
23 
28 {
32  public function ‪verifyCleanReferenceIndex(): void
33  {
34  // The test verifies the imported data set has a clean reference index by the check in tearDown()
35  self::assertTrue(true);
36  }
37 
42  public function ‪createParentContent(): void
43  {
44  parent::createParentContent();
45  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv');
46 
47  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
48  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
49  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
50  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
51  }
52 
57  public function ‪modifyParentContent(): void
58  {
59  parent::modifyParentContent();
60  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv');
61 
62  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
63  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
64  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
65  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
66  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
67  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
68  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
69  }
70 
75  public function ‪deleteParentContent(): void
76  {
77  parent::deleteParentContent();
78  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv');
79 
80  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
81  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
82  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
83  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
84  }
85 
90  public function ‪copyParentContent(): void
91  {
92  parent::copyParentContent();
93  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv');
94 
95  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
96  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
97  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
98  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
99  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
100  }
101 
106  public function ‪copyParentContentToDifferentPage(): void
107  {
108  parent::copyParentContentToDifferentPage();
109  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv');
110 
111  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
112  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
113  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
114  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
115  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
116  }
117 
123  {
124  // Create translated page first
125  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
126  parent::copyParentContentToLanguageWithAllChildren();
127  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToLanguageWAllChildren.csv');
128 
129  // Set up "dk" to not have overlays
130  $languageConfiguration = ‪$this->siteLanguageConfiguration;
131  $languageConfiguration[‪self::VALUE_LanguageId]['fallbackType'] = 'free';
132  $this->‪setUpFrontendSite(1, $languageConfiguration);
133  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
134  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
135  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
136  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
137  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
138  }
139 
145  {
146  // Create translated page first
147  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
148  parent::localizeParentContentWithAllChildren();
149  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv');
150 
151  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
152  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
153  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
154  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
155  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
156  }
157 
163  {
164  // Create translated page first
165  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
166  parent::localizeParentContentWithLanguageSynchronization();
167  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv');
168 
169  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
170  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
171  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
172  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
173  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
174  }
175 
181  {
182  // Create translated page first
183  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
184  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond);
185  parent::localizeParentContentChainLanguageSynchronizationSource();
186  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentChainLanguageSynchronizationSource.csv');
187 
188  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond));
189  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
190  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
191  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
192  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Deutsch:] [Translate to Dansk:] Hotel #1', '[Translate to Deutsch:] [Translate to Dansk:] Hotel #2'));
193  }
194 
200  {
201  // Create translated page first
202  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
203  parent::localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization();
204  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentNCreateNestedChildrenWLanguageSynchronization.csv');
205 
206  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
207  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
208  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
209  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
210  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] New Hotel #1'));
211  }
212 
218  {
219  // Create translated page first
220  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
221  parent::localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization();
222  // the assertion is the same as for localizeParentContentWithLanguageSynchronization()
223  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv');
224 
225  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
226  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
227  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
228  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
229  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
230  }
231 
237  {
238  // Create translated page first
239  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
240  parent::localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization();
241  // the assertion is the same as for localizeParentContentWithLanguageSynchronization()
242  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv');
243 
244  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
245  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
246  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
247  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
248  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
249  }
250 
255  public function ‪changeParentContentSorting(): void
256  {
257  parent::changeParentContentSorting();
258  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv');
259 
260  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
261  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
262  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
263  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
264  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
265  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
266  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
267  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
268  }
269 
274  public function ‪moveParentContentToDifferentPage(): void
275  {
276  parent::moveParentContentToDifferentPage();
277  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv');
278 
279  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
280  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
281  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
282  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
283  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
284  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
285  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
286  }
287 
293  {
294  parent::moveParentContentToDifferentPageAndChangeSorting();
295  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv');
296 
297  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
298  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
299  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
300  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
301  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
302  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
303  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
304  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
305  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
306  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
307  }
308 
317  public function ‪modifyPage(): void
318  {
319  parent::modifyPage();
320  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv');
321 
322  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
323  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
324  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
325  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
326  }
327 
332  public function ‪deletePage(): void
333  {
334  parent::deletePage();
335  $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv');
336 
337  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
338  self::assertEquals(404, $response->getStatusCode());
339  }
340 
345  public function ‪copyPage(): void
346  {
347  parent::copyPage();
348  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv');
349 
350  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
351  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
352  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
353  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
354  }
355 
361  {
362  parent::copyPageWithHotelBeforeParentContent();
363  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv');
364 
365  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
366  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
367  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
368  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
369  }
370 
380  {
381  parent::createParentContentWithHotelAndOfferChildren();
382  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv');
383 
384  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
385  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
386  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
387  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
388  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
389  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
390  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
391  }
392 
398  {
399  parent::createAndCopyParentContentWithHotelAndOfferChildren();
400  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv');
401 
402  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
403  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
404  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
405  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
406  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
407  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
408  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
409  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
410  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
411  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
412  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
413  }
414 
420  {
421  // Create translated page first
422  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
423  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
424  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv');
425 
426  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
427  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
428  // Content record gets overlaid, thus using newContentId
429  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
430  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
431  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
432  // Hotel record gets overlaid, thus using newHotelId
433  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
434  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
435  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
436  }
437 
442  {
443  // Create translated page first
444  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
445  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration();
446  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildrenWOSortBy.csv');
447 
448  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
449  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
450  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
451  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
452  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
453  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
454  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
455  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
456  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
457  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
458  }
459 
464  public function ‪modifyOnlyHotelChild(): void
465  {
466  parent::modifyOnlyHotelChild();
467  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv');
468 
469  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
470  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
471  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
472  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
473  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
474  }
475 
481  {
482  parent::modifyParentAndChangeHotelChildrenSorting();
483  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv');
484 
485  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
486  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
487  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
488  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
489  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
490  }
491 
496  public function ‪modifyParentWithHotelChild(): void
497  {
498  parent::modifyParentWithHotelChild();
499  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv');
500 
501  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
502  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
503  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
504  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
505  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
506  }
507 
512  public function ‪modifyParentAndAddHotelChild(): void
513  {
514  parent::modifyParentAndAddHotelChild();
515  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv');
516 
517  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
518  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
519  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
520  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
521  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
522  }
523 
528  public function ‪modifyParentAndDeleteHotelChild(): void
529  {
530  parent::modifyParentAndDeleteHotelChild();
531  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv');
532 
533  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
534  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
535  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
536  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
537  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
538  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
539  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
540  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
541  }
542 
548  {
549  parent::localizePageWithLocalizationExclude();
550  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWExclude.csv');
551 
552  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
553  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
554  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
555  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
556  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
557  }
558 
564  {
565  parent::localizePageTwiceWithLocalizationExclude();
566  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageTwiceWExclude.csv');
567 
568  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
569  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
570  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
571  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
572  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
573  }
574 
580  {
581  parent::localizePageAndAddHotelChildWithLocalizationExclude();
582  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWExclude.csv');
583 
584  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
585  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
586  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
587  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
588  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
589  }
590 
596  {
597  parent::localizePageWithLanguageSynchronization();
598  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWSynchronization.csv');
599 
600  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
601  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
602  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
603  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
604  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
605  }
606 
612  {
613  parent::localizePageAndAddHotelChildWithLanguageSynchronization();
614  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWSynchronization.csv');
615 
616  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
617  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
618  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
619  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
620  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0', '[Translate to Dansk:] Hotel #007'));
621  }
622 
628  {
629  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
630  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddMonoglotHotelChildWSynchronization.csv');
631 
632  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
633  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
634  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
635  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
636  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
637  }
638 
644  {
645  parent::localizeAndCopyPageWithLanguageSynchronization();
646  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPageWSynchronization.csv');
647 
648  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
649  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
650  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
651  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
652  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
653  }
654 
663  {
664  parent::localizePageWithSynchronizationAndCustomLocalizedHotel();
665  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWithSynchronizationAndCustomLocalizedHotel.csv');
666 
667  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
668  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
669  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
670  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
671  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
672  }
673 
679  {
680  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
681  parent::copyPage();
682  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAddMonoglotHotelChildNCopyPageWSynchronization.csv');
683 
684  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
685  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
686  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
687  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
688  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
689  }
690 
695  {
696  parent::inlineLocalizeSynchronizeLocalizeMissing();
697  $this->assertCSVDataSet(__DIR__ . '/DataSet/inlineLocalizeSynchronizeLocalizeMissing.csv');
698  }
699 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:32
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddHotelChildWithLanguageSynchronization
‪localizePageAndAddHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:611
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToLanguageWithAllChildren
‪copyParentContentToLanguageWithAllChildren()
Definition: ActionTest.php:122
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setUpFrontendSite
‪setUpFrontendSite(int $pageId, array $additionalLanguages=[])
Definition: AbstractDataHandlerActionTestCase.php:127
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest
Definition: ActionTest.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:245
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify
Definition: ActionTest.php:18
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:261
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:345
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: ActionTest.php:595
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration
‪createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration()
Definition: ActionTest.php:441
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeAndCopyPageWithLanguageSynchronization
‪localizeAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:643
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddMonoglotHotelChildWithLanguageSynchronization
‪localizePageAndAddMonoglotHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:627
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:90
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:419
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:42
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:274
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithLanguageSynchronization
‪localizeParentContentWithLanguageSynchronization()
Definition: ActionTest.php:162
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithSynchronizationAndCustomLocalizedHotel
‪localizePageWithSynchronizationAndCustomLocalizedHotel()
Definition: ActionTest.php:662
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:269
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:317
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:75
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization
‪localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization()
Definition: ActionTest.php:199
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentChainLanguageSynchronizationSource
‪localizeParentContentChainLanguageSynchronizationSource()
Definition: ActionTest.php:180
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:397
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAndAddHotelChildWithLocalizationExclude
‪localizePageAndAddHotelChildWithLocalizationExclude()
Definition: ActionTest.php:579
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:106
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:292
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:496
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:253
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageTwiceWithLocalizationExclude
‪localizePageTwiceWithLocalizationExclude()
Definition: ActionTest.php:563
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\$siteLanguageConfiguration
‪array $siteLanguageConfiguration
Definition: AbstractDataHandlerActionTestCase.php:72
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:512
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:528
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:27
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\inlineLocalizeSynchronizeLocalizeMissing
‪inlineLocalizeSynchronizeLocalizeMissing()
Definition: ActionTest.php:694
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:255
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization
‪localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:678
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizePageWithLocalizationExclude
‪localizePageWithLocalizationExclude()
Definition: ActionTest.php:547
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:57
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:144
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:464
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:360
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:379
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization()
Definition: ActionTest.php:217
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization
‪localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization()
Definition: ActionTest.php:236
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:480
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:332