‪TYPO3CMS  9.5
ActionTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
25  protected ‪$assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/';
26 
30  protected function ‪setUp()
31  {
32  parent::setUp();
33  }
34 
39  public function ‪createParentContent()
40  {
41  parent::createParentContent();
42  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
43  $this->‪assertAssertionDataSet('createParentContent');
44 
45  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
46  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
47  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
48  }
49 
54  public function ‪modifyParentContent()
55  {
56  parent::modifyParentContent();
57  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
58  $this->‪assertAssertionDataSet('modifyParentContent');
59 
60  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
61  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
62  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
63  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
64  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
65  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
66  }
67 
72  public function ‪deleteParentContent()
73  {
74  parent::deleteParentContent();
75  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
76  $this->‪assertAssertionDataSet('deleteParentContent');
77 
78  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
79  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
80  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
81  }
82 
88  {
89  parent::deleteParentContentAndDiscardDeletedParent();
90  // Actually this is not required, since there's nothing to publish... but it's a test case!
91  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast, false);
92  $this->‪assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
93 
94  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
95  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
96  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
97  }
98 
103  public function ‪copyParentContent()
104  {
105  parent::copyParentContent();
106  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
107  $this->‪assertAssertionDataSet('copyParentContent');
108 
109  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
110  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
111  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
112  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
113  }
114 
119  public function ‪copyParentContentToDifferentPage()
120  {
121  parent::copyParentContentToDifferentPage();
122  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
123  $this->‪assertAssertionDataSet('copyParentContentToDifferentPage');
124 
125  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
126  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
127  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
128  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
129  }
130 
136  {
137  parent::localizeParentContentWithAllChildren();
138  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
139  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
140 
141  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
142  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
143  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
144  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
145  }
146 
151  public function ‪changeParentContentSorting()
152  {
153  parent::changeParentContentSorting();
154  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
155  $this->‪assertAssertionDataSet('changeParentContentSorting');
156 
157  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
158  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
159  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
160  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
161  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
162  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
163  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
164  }
165 
170  public function ‪moveParentContentToDifferentPage()
171  {
172  parent::moveParentContentToDifferentPage();
173  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
174  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
175 
176  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
177  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
178  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
179  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
180  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
181  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
182  }
183 
189  {
190  parent::moveParentContentToDifferentPageAndChangeSorting();
191  $this->actionService->publishRecords(
192  [
193  self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast],
194  ]
195  );
196  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
197 
198  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
199  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
200  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
201  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
202  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
203  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
204  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
205  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
206  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
207  }
208 
217  public function ‪modifyPage()
218  {
219  parent::modifyPage();
220  $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId);
221  $this->‪assertAssertionDataSet('modifyPage');
222 
223  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
224  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
225  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
226  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
227  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
228  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
229  }
230 
235  public function ‪deletePage()
236  {
237  parent::deletePage();
238  $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId);
239  $this->‪assertAssertionDataSet('deletePage');
240 
241  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, 0, 0, false);
242  $this->assertContains('PageNotFoundException', $response->getError());
243  }
244 
249  public function ‪copyPage()
250  {
251  parent::copyPage();
252  $this->actionService->publishRecords(
253  [
254  self::TABLE_Page => [$this->recordIds['newPageId']],
255  self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']],
256  ]
257  );
258  $this->‪assertAssertionDataSet('copyPage');
259 
260  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
261  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
262  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
263  }
264 
270  {
271  parent::copyPageWithHotelBeforeParentContent();
272  $this->actionService->publishRecords(
273  [
274  self::TABLE_Page => [$this->recordIds['newPageId']],
275  self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']],
276  ]
277  );
278  $this->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
279 
280  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
281  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
282  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
283  }
284 
294  {
295  parent::createParentContentWithHotelAndOfferChildren();
296  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
297  $this->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
298 
299  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
300  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
301  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
302  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
303  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
304  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
305  }
306 
312  {
313  parent::createAndCopyParentContentWithHotelAndOfferChildren();
314  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
315  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
316  $this->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
317 
318  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
319  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
320  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
321  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
322  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
323  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
324  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
325  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
326  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
327  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
328  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
329  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
330  }
331 
337  {
338  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
339  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
340  // Actually this is not required, since there's nothing to publish... but it's a test case!
341  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId'], false);
342  $this->‪assertAssertionDataSet('createNCopyParentNHotelNOfferChildrenNDiscardCopiedParent');
343 
344  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
345  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
346  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
347  }
348 
354  {
355  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
356  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
357  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
358  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
359 
360  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
361  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
362  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
363  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
364  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
365  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
366  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
367  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
368  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
369  }
370 
376  {
377  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
378  // Actually this is not required, since there's nothing to publish... but it's a test case!
379  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId'], false);
380  $this->‪assertAssertionDataSet('createNLocParentNHotelNOfferChildrenNDiscardCreatedParent');
381 
382  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
383  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
384  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
385  }
386 
392  {
393  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
394  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
395  // Actually this is not required, since there's nothing to publish... but it's a test case!
396  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], false);
397  $this->‪assertAssertionDataSet('createNLocParentNHotelNOfferChildrenNDiscardLocParent');
398 
399  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
400  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
401  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
402  }
403 
408  public function ‪modifyOnlyHotelChild()
409  {
410  parent::modifyOnlyHotelChild();
411  $this->actionService->publishRecord(self::TABLE_Hotel, 4);
412  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
413 
414  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
415  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
416  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
417  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
418  }
419 
425  {
426  parent::modifyParentAndChangeHotelChildrenSorting();
427  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
428  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
429 
430  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
431  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
432  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
433  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
434  }
435 
440  public function ‪modifyParentWithHotelChild()
441  {
442  parent::modifyParentWithHotelChild();
443  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
444  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
445 
446  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
447  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
448  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
449  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
450  }
451 
457  {
458  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
459  // Actually this is not required, since there's nothing to publish... but it's a test case!
460  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, false);
461  $this->‪assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
462 
463  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
464  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
465  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
466  // Discarding the parent shall not discard the child records
467  // Since the discarded parent does not need to be published, version children are not published as well
468  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
469  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
470  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
471  $this->assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
472  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
473  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #1'));
474  }
475 
481  {
482  parent::modifyParentWithHotelChildAndDiscardAll();
483  // Actually this is not required, since there's nothing to publish... but it's a test case!
484  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, false);
485  $this->‪assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
486 
487  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
488  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
489  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
490  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
491  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
492  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
493  }
494 
499  public function ‪modifyParentAndAddHotelChild()
500  {
501  parent::modifyParentAndAddHotelChild();
502  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
503  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
504 
505  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
506  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
507  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
508  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
509  }
510 
515  public function ‪modifyParentAndDeleteHotelChild()
516  {
517  parent::modifyParentAndDeleteHotelChild();
518  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
519  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
520 
521  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
522  $this->assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
523  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
524  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
525  $this->assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
526  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
527  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
528  }
529 
535  {
536  parent::modifyAndDiscardAndModifyParentWithHotelChild();
537  $this->actionService->publishRecords(
538  [
539  self::TABLE_Content => [self::VALUE_ContentIdFirst],
540  self::TABLE_Hotel => [3, 4],
541  ]
542  );
543  $this->‪assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
544 
545  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
546  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
547  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
548  $this->assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
549  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
550  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
551  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
552  $this->assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
553  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
554  }
555 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:102
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\deleteParentContentAndDiscardDeletedParent
‪deleteParentContentAndDiscardDeletedParent()
Definition: ActionTest.php:86
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent
‪createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent()
Definition: ActionTest.php:390
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:439
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:174
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:24
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:190
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:38
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:134
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentWithHotelChildAndDiscardAll
‪modifyParentWithHotelChildAndDiscardAll()
Definition: ActionTest.php:479
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\setUp
‪setUp()
Definition: ActionTest.php:29
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:268
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:53
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:187
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:310
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:71
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:198
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:514
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent
‪createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent()
Definition: ActionTest.php:374
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:407
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:169
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:118
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest
Definition: ActionTest.php:21
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:498
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:124
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:182
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent
‪createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent()
Definition: ActionTest.php:335
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:216
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase
Definition: AbstractActionTestCase.php:21
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:234
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish
Definition: ActionTest.php:2
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:248
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:423
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:292
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:533
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\modifyParentWithHotelChildAndDiscardModifiedParent
‪modifyParentWithHotelChildAndDiscardModifiedParent()
Definition: ActionTest.php:455
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:150
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Publish\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:352