‪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\InternalRequestContext;
23 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
24 
29 {
33  public function ‪verifyCleanReferenceIndex(): void
34  {
35  // The test verifies the imported data set has a clean reference index by the check in tearDown()
36  self::assertTrue(true);
37  }
38 
42  public function ‪createParentContent(): void
43  {
44  parent::createParentContent();
45  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv');
46 
47  $response = $this->executeFrontendSubRequest(
48  (new InternalRequest())->withPageId(self::VALUE_PageId),
49  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
50  );
51  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
52  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
53  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
54  }
55 
59  public function ‪modifyParentContent(): void
60  {
61  parent::modifyParentContent();
62  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv');
63 
64  $response = $this->executeFrontendSubRequest(
65  (new InternalRequest())->withPageId(self::VALUE_PageId),
66  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
67  );
68  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
69  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
70  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
71  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
72  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
73  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
74  }
75 
79  public function ‪deleteParentContent(): void
80  {
81  parent::deleteParentContent();
82  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv');
83 
84  $response = $this->executeFrontendSubRequest(
85  (new InternalRequest())->withPageId(self::VALUE_PageId),
86  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
87  );
88  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
89  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
90  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
91  }
92 
96  public function ‪copyParentContent(): void
97  {
98  parent::copyParentContent();
99  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv');
100 
101  $response = $this->executeFrontendSubRequest(
102  (new InternalRequest())->withPageId(self::VALUE_PageId),
103  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
104  );
105  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
106  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
107  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
108  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
109  }
110 
114  public function ‪copyParentContentToDifferentPage(): void
115  {
116  parent::copyParentContentToDifferentPage();
117  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv');
118 
119  $response = $this->executeFrontendSubRequest(
120  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
121  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
122  );
123  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
124  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
125  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
126  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
127  }
128 
133  {
134  // Create translated page first
135  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
136  parent::localizeParentContentWithAllChildren();
137  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv');
138 
139  $response = $this->executeFrontendSubRequest(
140  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
141  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
142  );
143  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
144  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
145  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
146  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
147  }
148 
152  public function ‪changeParentContentSorting(): void
153  {
154  parent::changeParentContentSorting();
155  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv');
156 
157  $response = $this->executeFrontendSubRequest(
158  (new InternalRequest())->withPageId(self::VALUE_PageId),
159  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
160  );
161  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
162  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
163  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
164  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
165  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
166  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
167  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
168  }
169 
173  public function ‪moveParentContentToDifferentPage(): void
174  {
175  parent::moveParentContentToDifferentPage();
176  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv');
177 
178  $response = $this->executeFrontendSubRequest(
179  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
180  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
181  );
182  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
183  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
184  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
185  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
186  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
187  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
188  }
189 
194  {
195  parent::moveParentContentToDifferentPageTwice();
196  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv');
197  }
198 
203  {
204  parent::moveParentContentToDifferentPageAndChangeSorting();
205  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv');
206 
207  $response = $this->executeFrontendSubRequest(
208  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
209  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
210  );
211  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
212  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
213  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
214  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
215  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
216  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
217  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
218  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
219  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
220  }
221 
229  public function ‪modifyPage(): void
230  {
231  parent::modifyPage();
232  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv');
233 
234  $response = $this->executeFrontendSubRequest(
235  (new InternalRequest())->withPageId(self::VALUE_PageId),
236  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
237  );
238  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
239  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
240  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
241  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
242  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
243  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
244  }
245 
249  public function ‪deletePage(): void
250  {
251  parent::deletePage();
252  $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv');
253 
254  $response = $this->executeFrontendSubRequest(
255  (new InternalRequest())->withPageId(self::VALUE_PageId),
256  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
257  );
258  self::assertEquals(404, $response->getStatusCode());
259  }
260 
264  public function ‪copyPage(): void
265  {
266  parent::copyPage();
267  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv');
268 
269  $response = $this->executeFrontendSubRequest(
270  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
271  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
272  );
273  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
274  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
275  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
276  }
277 
282  {
283  parent::copyPageWithHotelBeforeParentContent();
284  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv');
285 
286  $response = $this->executeFrontendSubRequest(
287  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
288  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
289  );
290  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
291  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
292  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
293  }
294 
304  {
305  parent::changeHotelSortingWithOfferNotWorkspaceAware();
306  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeHotelSortingWithOfferNotWorkspaceAware.csv');
307 
308  $response = $this->executeFrontendSubRequest(
309  (new InternalRequest())->withPageId(self::VALUE_PageId),
310  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
311  );
312  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
313  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
314  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
315  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
316  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
317  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.1'));
318  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
319  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
320  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.2'));
321  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
322  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdSecond)->setRecordField(self::FIELD_HotelOffer)
323  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #2.1'));
324  }
325 
330  {
331  parent::createParentContentWithHotelAndOfferChildren();
332  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv');
333 
334  $response = $this->executeFrontendSubRequest(
335  (new InternalRequest())->withPageId(self::VALUE_PageId),
336  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
337  );
338  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
339  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
340  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
341  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
342  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
343  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
344  }
345 
350  {
351  parent::createAndCopyParentContentWithHotelAndOfferChildren();
352  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv');
353 
354  $response = $this->executeFrontendSubRequest(
355  (new InternalRequest())->withPageId(self::VALUE_PageId),
356  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
357  );
358  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
359  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
360  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
361  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
362  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
363  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
364  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
365  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
366  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
367  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
368  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
369  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
370  }
371 
376  {
377  // Create translated page first
378  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
379  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
380  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv');
381 
382  $response = $this->executeFrontendSubRequest(
383  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
384  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
385  );
386  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
387  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
388  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
389  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
390  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
391  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
392  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
393  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
394  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
395  }
396 
402  {
403  // Create translated page first
404  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
405  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration();
406  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildrenWOSortBy.csv');
407 
408  $response = $this->executeFrontendSubRequest(
409  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
410  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
411  );
412  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
413  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
414  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
415  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
416  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
417  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
418  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
419  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
420  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
421  }
422 
426  public function ‪modifyOnlyHotelChild(): void
427  {
428  parent::modifyOnlyHotelChild();
429  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv');
430 
431  $response = $this->executeFrontendSubRequest(
432  (new InternalRequest())->withPageId(self::VALUE_PageId),
433  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
434  );
435  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
436  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
437  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
438  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
439  }
440 
445  {
446  parent::modifyParentAndChangeHotelChildrenSorting();
447  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv');
448 
449  $response = $this->executeFrontendSubRequest(
450  (new InternalRequest())->withPageId(self::VALUE_PageId),
451  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
452  );
453  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
454  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
455  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
456  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
457  }
458 
462  public function ‪modifyParentWithHotelChild(): void
463  {
464  parent::modifyParentWithHotelChild();
465  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv');
466 
467  $response = $this->executeFrontendSubRequest(
468  (new InternalRequest())->withPageId(self::VALUE_PageId),
469  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
470  );
471  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
472  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
473  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
474  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
475  }
476 
480  public function ‪modifyParentAndAddHotelChild(): void
481  {
482  parent::modifyParentAndAddHotelChild();
483  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv');
484 
485  $response = $this->executeFrontendSubRequest(
486  (new InternalRequest())->withPageId(self::VALUE_PageId),
487  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
488  );
489  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
490  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
491  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
492  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
493  }
494 
498  public function ‪modifyParentAndDeleteHotelChild(): void
499  {
500  parent::modifyParentAndDeleteHotelChild();
501  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv');
502 
503  $response = $this->executeFrontendSubRequest(
504  (new InternalRequest())->withPageId(self::VALUE_PageId),
505  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
506  );
507  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
508  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
509  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
510  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
511  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
512  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
513  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
514  }
515 
520  {
521  parent::modifyAndDiscardAndModifyParentWithHotelChild();
522  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv');
523 
524  $response = $this->executeFrontendSubRequest(
525  (new InternalRequest())->withPageId(self::VALUE_PageId),
526  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
527  );
528  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
529  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
530  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
531  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
532  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
533  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
534  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
535  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
536  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
537  }
538 
544  {
545  parent::inlineLocalizeSynchronizeLocalizeMissing();
546  $this->assertCSVDataSet(__DIR__ . '/DataSet/inlineLocalizeSynchronizeLocalizeMissing.csv');
547  }
548 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:498
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:245
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\inlineLocalizeSynchronizeLocalizeMissing
‪inlineLocalizeSynchronizeLocalizeMissing()
Definition: ActionTest.php:543
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:261
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:202
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:173
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:33
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:114
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:462
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:264
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:269
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:444
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:193
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:329
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest
Definition: ActionTest.php:29
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:132
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:229
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:96
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:42
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:249
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:253
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:281
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:349
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:152
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:480
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:519
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:375
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:426
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration
‪createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration()
Definition: ActionTest.php:401
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeHotelSortingWithOfferNotWorkspaceAware
‪changeHotelSortingWithOfferNotWorkspaceAware()
Definition: ActionTest.php:303