‪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\InternalRequestContext;
21 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
22 
27 {
31  protected ‪$assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/';
32 
36  protected ‪$assertCleanReferenceIndex = false;
37 
41  public function ‪createParentContent()
42  {
43  parent::createParentContent();
44  $this->‪assertAssertionDataSet('createParentContent');
45 
46  $response = $this->executeFrontendRequest(
47  (new InternalRequest())->withPageId(self::VALUE_PageId),
48  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
49  );
50  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
51  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
52  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
53  }
54 
58  public function ‪modifyParentContent()
59  {
60  parent::modifyParentContent();
61  $this->‪assertAssertionDataSet('modifyParentContent');
62 
63  $response = $this->executeFrontendRequest(
64  (new InternalRequest())->withPageId(self::VALUE_PageId),
65  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
66  );
67  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
68  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
69  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
70  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
71  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
72  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
73  }
74 
78  public function ‪deleteParentContent()
79  {
80  parent::deleteParentContent();
81  $this->‪assertAssertionDataSet('deleteParentContent');
82 
83  $response = $this->executeFrontendRequest(
84  (new InternalRequest())->withPageId(self::VALUE_PageId),
85  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
86  );
87  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
88  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
89  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
90  }
91 
95  public function ‪copyParentContent()
96  {
97  parent::copyParentContent();
98  $this->‪assertAssertionDataSet('copyParentContent');
99 
100  $response = $this->executeFrontendRequest(
101  (new InternalRequest())->withPageId(self::VALUE_PageId),
102  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
103  );
104  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
105  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
106  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
107  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
108  }
109 
113  public function ‪copyParentContentToDifferentPage()
114  {
115  parent::copyParentContentToDifferentPage();
116  $this->‪assertAssertionDataSet('copyParentContentToDifferentPage');
117 
118  $response = $this->executeFrontendRequest(
119  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
120  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
121  );
122  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
123  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
124  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
125  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
126  }
127 
132  {
133  // Create translated page first
134  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
135  parent::localizeParentContentWithAllChildren();
136  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
137 
138  $response = $this->executeFrontendRequest(
139  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
140  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
141  );
142  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
143  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
144  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
145  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
146  }
147 
151  public function ‪changeParentContentSorting()
152  {
153  parent::changeParentContentSorting();
154  $this->‪assertAssertionDataSet('changeParentContentSorting');
155 
156  $response = $this->executeFrontendRequest(
157  (new InternalRequest())->withPageId(self::VALUE_PageId),
158  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
159  );
160  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
161  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
162  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
163  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
164  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
165  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
166  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
167  }
168 
172  public function ‪moveParentContentToDifferentPage()
173  {
174  parent::moveParentContentToDifferentPage();
175  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
176 
177  $response = $this->executeFrontendRequest(
178  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
179  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
180  );
181  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
182  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
183  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
184  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
185  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
186  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
187  }
188 
193  {
194  parent::moveParentContentToDifferentPageTwice();
195  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageTwice');
196  }
197 
202  {
203  parent::moveParentContentToDifferentPageAndChangeSorting();
204  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
205 
206  $response = $this->executeFrontendRequest(
207  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
208  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
209  );
210  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
211  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
212  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
213  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
214  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
215  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
216  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
217  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
218  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
219  }
220 
228  public function ‪modifyPage()
229  {
230  parent::modifyPage();
231  $this->‪assertAssertionDataSet('modifyPage');
232 
233  $response = $this->executeFrontendRequest(
234  (new InternalRequest())->withPageId(self::VALUE_PageId),
235  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
236  );
237  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
238  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
239  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
240  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
241  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
242  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
243  }
244 
248  public function ‪deletePage()
249  {
250  parent::deletePage();
251  $this->‪assertAssertionDataSet('deletePage');
252 
253  $response = $this->executeFrontendRequest(
254  (new InternalRequest())->withPageId(self::VALUE_PageId),
255  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
256  );
257  self::assertEquals(404, $response->getStatusCode());
258  }
259 
263  public function ‪copyPage()
264  {
265  parent::copyPage();
266  $this->‪assertAssertionDataSet('copyPage');
267 
268  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
284 
285  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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->‪assertAssertionDataSet('changeHotelSortingWithOfferNotWorkspaceAware');
306 
307  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
332 
333  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
352 
353  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
380 
381  $response = $this->executeFrontendRequest(
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('Default', 'Extbase:list()');
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['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
393  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
394  }
395 
401  {
402  // Create translated page first
403  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
404  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration();
405  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenWOSortBy');
406 
407  $response = $this->executeFrontendRequest(
408  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
409  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
410  );
411  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
412  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
413  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
414  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
415  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
416  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
417  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
418  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
419  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
420  }
421 
425  public function ‪modifyOnlyHotelChild()
426  {
427  parent::modifyOnlyHotelChild();
428  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
429 
430  $response = $this->executeFrontendRequest(
431  (new InternalRequest())->withPageId(self::VALUE_PageId),
432  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
433  );
434  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
435  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
436  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
437  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
438  }
439 
444  {
445  parent::modifyParentAndChangeHotelChildrenSorting();
446  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
447 
448  $response = $this->executeFrontendRequest(
449  (new InternalRequest())->withPageId(self::VALUE_PageId),
450  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
451  );
452  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
453  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
454  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
455  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
456  }
457 
461  public function ‪modifyParentWithHotelChild()
462  {
463  parent::modifyParentWithHotelChild();
464  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
465 
466  $response = $this->executeFrontendRequest(
467  (new InternalRequest())->withPageId(self::VALUE_PageId),
468  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
469  );
470  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
471  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
472  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
473  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
474  }
475 
479  public function ‪modifyParentAndAddHotelChild()
480  {
481  parent::modifyParentAndAddHotelChild();
482  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
483 
484  $response = $this->executeFrontendRequest(
485  (new InternalRequest())->withPageId(self::VALUE_PageId),
486  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
487  );
488  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
489  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
490  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
491  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
492  }
493 
497  public function ‪modifyParentAndDeleteHotelChild()
498  {
499  parent::modifyParentAndDeleteHotelChild();
500  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
501 
502  $response = $this->executeFrontendRequest(
503  (new InternalRequest())->withPageId(self::VALUE_PageId),
504  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
505  );
506  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
507  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
508  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
509  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
510  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
511  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
512  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
513  }
514 
519  {
520  parent::modifyAndDiscardAndModifyParentWithHotelChild();
521  $this->‪assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
522 
523  $response = $this->executeFrontendRequest(
524  (new InternalRequest())->withPageId(self::VALUE_PageId),
525  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
526  );
527  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
528  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
529  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
530  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
531  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
532  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
533  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
534  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
535  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
536  }
537 
542  public function ‪inlineLocalizeSynchronizeLocalizeMissing(): void
543  {
544  parent::inlineLocalizeSynchronizeLocalizeMissing();
545  $this->‪assertAssertionDataSet('inlineLocalizeSynchronizeLocalizeMissing');
546  }
547 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:495
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:289
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\inlineLocalizeSynchronizeLocalizeMissing
‪inlineLocalizeSynchronizeLocalizeMissing()
Definition: ActionTest.php:540
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:305
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:199
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:30
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:170
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:111
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:459
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:261
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:313
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:441
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify
Definition: ActionTest.php:16
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:190
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:326
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:129
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:226
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:93
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:246
‪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\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:278
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:346
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:149
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:477
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:34
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:516
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:372
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:423
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration
‪createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration()
Definition: ActionTest.php:398
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest\changeHotelSortingWithOfferNotWorkspaceAware
‪changeHotelSortingWithOfferNotWorkspaceAware()
Definition: ActionTest.php:300