‪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();
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();
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();
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();
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();
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  parent::copyParentContentToLanguageWithAllChildren();
125  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToLanguageWithAllChildren.csv');
126 
127  // Set up "dk" to not have overlays
128  $languageConfiguration = ‪$this->siteLanguageConfiguration;
129  $languageConfiguration[‪self::VALUE_LanguageId]['fallbackType'] = 'free';
130  $this->‪setUpFrontendSite(1, $languageConfiguration);
131 
132  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
133  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default');
134  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
135  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
136  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
137  }
138 
144  {
145  // Create translated page first
146  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
147 
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();
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 
167  parent::localizeParentContentWithLanguageSynchronization();
168  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentLanguageSynchronization.csv');
169 
170  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
171  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
172  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
173  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
174  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] Hotel #2'));
175  }
176 
181  public function ‪changeParentContentSorting(): void
182  {
183  parent::changeParentContentSorting();
184  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv');
185 
186  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
187  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
188  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
189  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
190  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
191  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
192  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
193  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
194  }
195 
200  public function ‪moveParentContentToDifferentPage(): void
201  {
202  parent::moveParentContentToDifferentPage();
203  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv');
204 
205  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
206  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
207  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
208  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
209  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
210  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
211  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
212  }
213 
219  {
220  parent::moveParentContentToDifferentPageAndChangeSorting();
221  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv');
222 
223  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
224  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
225  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
226  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
227  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
228  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
229  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
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('Hotel #1'));
233  }
234 
243  public function ‪modifyPage(): void
244  {
245  parent::modifyPage();
246  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv');
247 
248  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
249  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
250  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
251  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
252  }
253 
258  public function ‪deletePage(): void
259  {
260  parent::deletePage();
261  $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv');
262 
263  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
264  self::assertEquals(404, $response->getStatusCode());
265  }
266 
271  public function ‪copyPage(): void
272  {
273  parent::copyPage();
274  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv');
275 
276  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
277  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
278  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
279  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
280  }
281 
287  {
288  parent::copyPageWithHotelBeforeParentContent();
289  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv');
290 
291  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
292  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
293  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
294  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
295  }
296 
306  {
307  parent::createParentContentWithHotelAndOfferChildren();
308  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv');
309 
310  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
311  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
312  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
313  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
314  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
315  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
316  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
317  }
318 
324  {
325  parent::createAndCopyParentContentWithHotelAndOfferChildren();
326  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv');
327 
328  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
329  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
330  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
331  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
332  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
333  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
334  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
335  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
336  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
337  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
338  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
339  }
340 
346  {
347  // Create translated page first
348  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
349 
350  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
351  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv');
352 
353  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
354  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
355  // Content record gets overlaid, thus using newContentId
356  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
357  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
358  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
359  // Content record directly points to localized child, thus using localizedHotelId
360  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
361  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
362  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
363  }
364 
369  public function ‪modifyOnlyHotelChild(): void
370  {
371  parent::modifyOnlyHotelChild();
372  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv');
373 
374  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
375  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
376  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
377  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
378  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
379  }
380 
386  {
387  parent::modifyParentAndChangeHotelChildrenSorting();
388  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv');
389 
390  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
391  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
392  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
393  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
394  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
395  }
396 
401  public function ‪modifyParentWithHotelChild(): void
402  {
403  parent::modifyParentWithHotelChild();
404  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv');
405 
406  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
407  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
408  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
409  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
410  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
411  }
412 
417  public function ‪modifyParentAndAddHotelChild(): void
418  {
419  parent::modifyParentAndAddHotelChild();
420  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv');
421 
422  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
423  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
424  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
425  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
426  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
427  }
428 
433  public function ‪modifyParentAndDeleteHotelChild(): void
434  {
435  parent::modifyParentAndDeleteHotelChild();
436  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv');
437 
438  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
439  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
440  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
441  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
442  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
443  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
444  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
445  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
446  }
447 
453  {
454  parent::localizePageWithLocalizationExclude();
455  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWExclude.csv');
456 
457  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
458  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
459  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
460  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
461  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
462  }
463 
469  {
470  parent::localizePageTwiceWithLocalizationExclude();
471  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageTwiceWExclude.csv');
472 
473  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
474  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
475  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
476  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
477  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
478  }
479 
485  {
486  parent::localizePageAndAddHotelChildWithLocalizationExclude();
487  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWExclude.csv');
488 
489  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
490  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
491  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
492  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
493  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
494  }
495 
501  {
502  parent::localizePageWithLanguageSynchronization();
503  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWSynchronization.csv');
504 
505  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
506  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
507  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
508  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
509  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
510  }
511 
517  {
518  parent::localizePageAndAddHotelChildWithLanguageSynchronization();
519  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWSynchronization.csv');
520 
521  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
522  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
523  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
524  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
525  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0', '[Translate to Dansk:] Hotel #007'));
526  }
527 
533  {
534  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
535  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddMonoglotHotelChildWSynchronization.csv');
536 
537  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
538  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
539  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
540  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
541  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
542  }
543 
549  {
550  parent::localizeAndCopyPageWithLanguageSynchronization();
551  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPageWSynchronization.csv');
552 
553  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
554  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
555  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
556  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
557  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
558  }
559 
568  {
569  parent::localizePageWithSynchronizationAndCustomLocalizedHotel();
570  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWithSynchronizationAndCustomLocalizedHotel.csv');
571 
572  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
573  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
574  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
575  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
576  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
577  }
578 
584  {
585  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
586  parent::copyPage();
587  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAddMonoglotHotelChildNCopyPageWSynchronization.csv');
588 
589  $response = $this->executeFrontendSubRequest((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 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddMonoglotHotelChildWithLanguageSynchronization
‪localizePageAndAddMonoglotHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:532
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:32
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setUpFrontendSite
‪setUpFrontendSite(int $pageId, array $additionalLanguages=[])
Definition: AbstractDataHandlerActionTestCase.php:127
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:75
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:323
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithLocalizationExclude
‪localizePageWithLocalizationExclude()
Definition: ActionTest.php:452
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:245
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: ActionTest.php:500
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:261
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:369
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:243
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:200
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageTwiceWithLocalizationExclude
‪localizePageTwiceWithLocalizationExclude()
Definition: ActionTest.php:468
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithSynchronizationAndCustomLocalizedHotel
‪localizePageWithSynchronizationAndCustomLocalizedHotel()
Definition: ActionTest.php:567
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:181
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest
Definition: ActionTest.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:417
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:269
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:90
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:305
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddHotelChildWithLocalizationExclude
‪localizePageAndAddHotelChildWithLocalizationExclude()
Definition: ActionTest.php:484
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:57
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:433
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:345
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:218
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:143
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:385
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddHotelChildWithLanguageSynchronization
‪localizePageAndAddHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:516
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization
‪localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:583
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase
Definition: AbstractActionTestCase.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:286
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:35
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:253
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify
Definition: ActionTest.php:18
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\$siteLanguageConfiguration
‪array $siteLanguageConfiguration
Definition: AbstractDataHandlerActionTestCase.php:72
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:258
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeAndCopyPageWithLanguageSynchronization
‪localizeAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:548
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:401
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:271
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:42
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToLanguageWithAllChildren
‪copyParentContentToLanguageWithAllChildren()
Definition: ActionTest.php:122
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithLanguageSynchronization
‪localizeParentContentWithLanguageSynchronization()
Definition: ActionTest.php:162
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:106