‪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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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  $response = $this->executeFrontendSubRequest(
269  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
270  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
271  );
272  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
273  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
274  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
275  }
276 
281  {
282  parent::copyPageWithHotelBeforeParentContent();
283  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv');
284 
285  $response = $this->executeFrontendSubRequest(
286  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
287  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
288  );
289  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
290  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
291  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
292  }
293 
303  {
304  parent::changeHotelSortingWithOfferNotWorkspaceAware();
305  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeHotelSortingWithOfferNotWorkspaceAware.csv');
306 
307  $response = $this->executeFrontendSubRequest(
308  (new InternalRequest())->withPageId(self::VALUE_PageId),
309  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
310  );
311  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
312  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
313  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
314  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
315  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
316  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.1'));
317  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
318  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
319  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.2'));
320  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
321  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdSecond)->setRecordField(self::FIELD_HotelOffer)
322  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #2.1'));
323  }
324 
329  {
330  parent::createParentContentWithHotelAndOfferChildren();
331  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv');
332 
333  $response = $this->executeFrontendSubRequest(
334  (new InternalRequest())->withPageId(self::VALUE_PageId),
335  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
336  );
337  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
338  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
339  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
340  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
341  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
342  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
343  }
344 
349  {
350  parent::createAndCopyParentContentWithHotelAndOfferChildren();
351  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv');
352 
353  $response = $this->executeFrontendSubRequest(
354  (new InternalRequest())->withPageId(self::VALUE_PageId),
355  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
356  );
357  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
358  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
359  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
360  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
361  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
362  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
363  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
364  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
365  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
366  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
367  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
368  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
369  }
370 
375  {
376  // Create translated page first
377  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
378  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
379  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv');
380 
381  $response = $this->executeFrontendSubRequest(
382  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
383  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
384  );
385  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
386  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
387  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
388  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
389  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
390  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
391  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
392  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
393  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
394  }
395 
399  public function ‪modifyOnlyHotelChild(): void
400  {
401  parent::modifyOnlyHotelChild();
402  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv');
403 
404  $response = $this->executeFrontendSubRequest(
405  (new InternalRequest())->withPageId(self::VALUE_PageId),
406  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
407  );
408  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
409  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
410  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
411  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
412  }
413 
418  {
419  parent::modifyParentAndChangeHotelChildrenSorting();
420  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv');
421 
422  $response = $this->executeFrontendSubRequest(
423  (new InternalRequest())->withPageId(self::VALUE_PageId),
424  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
425  );
426  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
427  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
428  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
429  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
430  }
431 
435  public function ‪modifyParentWithHotelChild(): void
436  {
437  parent::modifyParentWithHotelChild();
438  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv');
439 
440  $response = $this->executeFrontendSubRequest(
441  (new InternalRequest())->withPageId(self::VALUE_PageId),
442  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
443  );
444  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
445  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
446  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
447  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
448  }
449 
453  public function ‪modifyParentAndAddHotelChild(): void
454  {
455  parent::modifyParentAndAddHotelChild();
456  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv');
457 
458  $response = $this->executeFrontendSubRequest(
459  (new InternalRequest())->withPageId(self::VALUE_PageId),
460  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
461  );
462  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
463  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
464  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
465  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
466  }
467 
471  public function ‪modifyParentAndDeleteHotelChild(): void
472  {
473  parent::modifyParentAndDeleteHotelChild();
474  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv');
475 
476  $response = $this->executeFrontendSubRequest(
477  (new InternalRequest())->withPageId(self::VALUE_PageId),
478  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
479  );
480  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
481  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
482  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
483  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
484  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
485  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
486  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
487  }
488 
493  {
494  parent::modifyAndDiscardAndModifyParentWithHotelChild();
495  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv');
496 
497  $response = $this->executeFrontendSubRequest(
498  (new InternalRequest())->withPageId(self::VALUE_PageId),
499  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
500  );
501  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
502  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
503  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
504  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
505  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
506  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
507  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
508  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
509  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
510  }
511 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:249
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:193
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:453
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:245
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:261
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:114
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:202
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:492
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeHotelSortingWithOfferNotWorkspaceAware
‪changeHotelSortingWithOfferNotWorkspaceAware()
Definition: ActionTest.php:302
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:264
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify
Definition: ActionTest.php:18
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:269
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:348
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:471
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:42
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:59
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:417
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:229
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:280
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:96
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:374
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:435
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:253
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:152
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:33
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:79
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest
Definition: ActionTest.php:29
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:132
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:173
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:399
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:328