‪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/CSV/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();
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();
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();
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();
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();
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 
130  parent::copyParentContentToLanguage();
131  $this->‪assertAssertionDataSet('copyParentContentToLanguage');
132 
133  // Set up "dk" to not have overlays
134  $languageConfiguration = ‪$this->siteLanguageConfiguration;
135  $languageConfiguration[‪self::VALUE_LanguageId]['fallbackType'] = 'free';
136  $this->‪setUpFrontendSite(1, $languageConfiguration);
137 
138  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
139  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default');
140  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
141  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
142  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
143  }
144 
150  {
151  // Create translated page first
152  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
153 
154  parent::localizeParentContentWithAllChildren();
155  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
156 
157  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
158  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
159  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
160  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
161  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
162  }
163 
169  {
170  // Create translated page first
171  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
172 
173  parent::localizeParentContentWithLanguageSynchronization();
174  $this->‪assertAssertionDataSet('localizeParentContentLanguageSynchronization');
175 
176  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
177  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
178  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
179  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
180  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] Hotel #2'));
181  }
182 
187  public function ‪changeParentContentSorting()
188  {
189  parent::changeParentContentSorting();
190  $this->‪assertAssertionDataSet('changeParentContentSorting');
191 
192  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
193  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
194  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
195  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
196  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
197  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
198  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
199  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
200  }
201 
206  public function ‪moveParentContentToDifferentPage()
207  {
208  parent::moveParentContentToDifferentPage();
209  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
210 
211  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
212  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
213  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
214  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
215  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
216  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
217  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
218  }
219 
225  {
226  parent::moveParentContentToDifferentPageAndChangeSorting();
227  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
228 
229  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
230  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
231  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
232  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
233  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
234  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
235  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
236  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
237  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
238  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
239  }
240 
249  public function ‪modifyPage()
250  {
251  parent::modifyPage();
252  $this->‪assertAssertionDataSet('modifyPage');
253 
254  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
255  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
256  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
257  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
258  }
259 
264  public function ‪deletePage()
265  {
266  parent::deletePage();
267  $this->‪assertAssertionDataSet('deletePage');
268 
269  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
270  self::assertEquals(404, $response->getStatusCode());
271  }
272 
277  public function ‪copyPage()
278  {
279  parent::copyPage();
280  $this->‪assertAssertionDataSet('copyPage');
281 
282  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
283  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
284  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
285  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
286  }
287 
293  {
294  parent::copyPageWithHotelBeforeParentContent();
295  $this->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
296 
297  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
298  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
299  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
300  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
301  }
302 
312  {
313  parent::createParentContentWithHotelAndOfferChildren();
314  $this->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
315 
316  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
317  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
318  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
319  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
320  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
321  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
322  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
323  }
324 
330  {
331  parent::createAndCopyParentContentWithHotelAndOfferChildren();
332  $this->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
333 
334  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
335  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
336  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
337  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
338  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
339  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
340  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
341  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
342  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
343  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
344  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
345  }
346 
352  {
353  // Create translated page first
354  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
355 
356  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
357  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
358 
359  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
360  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
361  // Content record gets overlaid, thus using newContentId
362  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
363  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
364  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
365  // Content record directly points to localized child, thus using localizedHotelId
366  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
367  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
368  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
369  }
370 
375  public function ‪modifyOnlyHotelChild()
376  {
377  parent::modifyOnlyHotelChild();
378  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
379 
380  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
381  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
382  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
383  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
384  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
385  }
386 
392  {
393  parent::modifyParentAndChangeHotelChildrenSorting();
394  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
395 
396  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
397  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
398  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
399  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
400  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
401  }
402 
407  public function ‪modifyParentWithHotelChild()
408  {
409  parent::modifyParentWithHotelChild();
410  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
411 
412  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
413  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
414  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
415  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
416  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
417  }
418 
423  public function ‪modifyParentAndAddHotelChild()
424  {
425  parent::modifyParentAndAddHotelChild();
426  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
427 
428  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
429  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
430  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
431  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
432  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
433  }
434 
439  public function ‪modifyParentAndDeleteHotelChild()
440  {
441  parent::modifyParentAndDeleteHotelChild();
442  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
443 
444  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
445  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
446  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
447  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
448  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
449  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
450  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
451  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
452  }
453 
459  {
460  parent::localizePageWithLocalizationExclude();
461  $this->‪assertAssertionDataSet('localizePageWExclude');
462 
463  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
464  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
465  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
466  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
467  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
468  }
469 
475  {
476  parent::localizePageTwiceWithLocalizationExclude();
477  $this->‪assertAssertionDataSet('localizePageTwiceWExclude');
478 
479  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
480  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
481  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
482  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
483  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0'));
484  }
485 
491  {
492  parent::localizePageAndAddHotelChildWithLocalizationExclude();
493  $this->‪assertAssertionDataSet('localizePageNAddHotelChildWExclude');
494 
495  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
496  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
497  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
498  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
499  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
500  }
501 
507  {
508  parent::localizePageWithLanguageSynchronization();
509  $this->‪assertAssertionDataSet('localizePageWSynchronization');
510 
511  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
512  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
513  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
514  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
515  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
516  }
517 
523  {
524  parent::localizePageAndAddHotelChildWithLanguageSynchronization();
525  $this->‪assertAssertionDataSet('localizePageNAddHotelChildWSynchronization');
526 
527  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
528  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
529  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
530  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
531  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0', '[Translate to Dansk:] Hotel #007'));
532  }
533 
539  {
540  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
541  $this->‪assertAssertionDataSet('localizePageNAddMonoglotHotelChildWSynchronization');
542 
543  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
544  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
545  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
546  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
547  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
548  }
549 
555  {
556  parent::localizeAndCopyPageWithLanguageSynchronization();
557  $this->‪assertAssertionDataSet('localizeNCopyPageWSynchronization');
558 
559  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
560  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
561  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
562  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
563  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
564  }
565 
574  {
575  parent::localizePageWithSynchronizationAndCustomLocalizedHotel();
576  $this->‪assertAssertionDataSet('localizePageWithSynchronizationAndCustomLocalizedHotel');
577 
578  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
579  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
580  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
581  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
582  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #0'));
583  }
584 
590  {
591  parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization();
592  parent::copyPage();
593  $this->‪assertAssertionDataSet('localizePageAddMonoglotHotelChildNCopyPageWSynchronization');
594 
595  $response = $this->executeFrontendRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
596  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
597  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
598  ->setRecordIdentifier(self::TABLE_Page . ':' . self::VALUE_PageId)->setRecordField(self::FIELD_PageHotel)
599  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #0', 'Hotel #007'));
600  }
601 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddMonoglotHotelChildWithLanguageSynchronization
‪localizePageAndAddMonoglotHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:537
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:34
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\setUpFrontendSite
‪setUpFrontendSite(int $pageId, array $additionalLanguages=[])
Definition: AbstractDataHandlerActionTestCase.php:143
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:77
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:328
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithLocalizationExclude
‪localizePageWithLocalizationExclude()
Definition: ActionTest.php:457
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:289
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithLanguageSynchronization
‪localizePageWithLanguageSynchronization()
Definition: ActionTest.php:505
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:305
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:374
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:248
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:29
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:205
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageTwiceWithLocalizationExclude
‪localizePageTwiceWithLocalizationExclude()
Definition: ActionTest.php:473
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageWithSynchronizationAndCustomLocalizedHotel
‪localizePageWithSynchronizationAndCustomLocalizedHotel()
Definition: ActionTest.php:572
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:186
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest
Definition: ActionTest.php:26
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:422
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:313
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:92
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:310
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddHotelChildWithLocalizationExclude
‪localizePageAndAddHotelChildWithLocalizationExclude()
Definition: ActionTest.php:489
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:59
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:438
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:350
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:223
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:148
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:390
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAndAddHotelChildWithLanguageSynchronization
‪localizePageAndAddHotelChildWithLanguageSynchronization()
Definition: ActionTest.php:521
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization
‪localizePageAddMonoglotHotelChildAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:588
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:291
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase\VALUE_LanguageId
‪const VALUE_LanguageId
Definition: AbstractActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:297
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify
Definition: ActionTest.php:16
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\$siteLanguageConfiguration
‪array $siteLanguageConfiguration
Definition: AbstractDataHandlerActionTestCase.php:86
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:263
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeAndCopyPageWithLanguageSynchronization
‪localizeAndCopyPageWithLanguageSynchronization()
Definition: ActionTest.php:553
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:406
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:276
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:44
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToLanguageWithAllChildren
‪copyParentContentToLanguageWithAllChildren()
Definition: ActionTest.php:124
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithLanguageSynchronization
‪localizeParentContentWithLanguageSynchronization()
Definition: ActionTest.php:167
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:108