TYPO3  7.6
IRRE/CSV/PublishAll/ActionTest.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\PublishAll;
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/PublishAll/DataSet/';
26 
31  protected function setUp()
32  {
33  parent::setUp();
34  }
35 
40  public function createParentContent()
41  {
42  parent::createParentContent();
43  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
44  $this->assertAssertionDataSet('createParentContent');
45 
46  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
47  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
48  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
49  }
50 
55  public function modifyParentContent()
56  {
57  parent::modifyParentContent();
58  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
59  $this->assertAssertionDataSet('modifyParentContent');
60 
61  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
62  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
63  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
64  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
65  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
66  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
67  }
68 
73  public function deleteParentContent()
74  {
75  parent::deleteParentContent();
76  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
77  $this->assertAssertionDataSet('deleteParentContent');
78 
79  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
80  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
81  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
82  }
83 
89  {
90  parent::deleteParentContentAndDiscardDeletedParent();
91  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
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->publishWorkspace(self::VALUE_WorkspaceId);
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 
120  {
121  parent::copyParentContentToDifferentPage();
122  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
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::localizeParentContentInKeepMode();
138  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
139  $this->assertAssertionDataSet('localizeParentContentKeep');
140 
141  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
142  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
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 
152  {
153  parent::localizeParentContentWithAllChildrenInKeepMode();
154  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
155  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
156 
157  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
158  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
159  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
160  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
161  }
162 
168  {
169  parent::localizeParentContentInSelectMode();
170  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
171  $this->assertAssertionDataSet('localizeParentContentSelect');
172 
173  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
174  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
175  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
176  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
177  }
178 
184  {
185  parent::localizeParentContentWithAllChildrenInSelectMode();
186  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
187  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
188 
189  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
190  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
191  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
192  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
193  }
194 
199  public function changeParentContentSorting()
200  {
201  parent::changeParentContentSorting();
202  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
203  $this->assertAssertionDataSet('changeParentContentSorting');
204 
205  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
206  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
207  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
208  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
209  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
210  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
211  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
212  }
213 
219  {
220  parent::moveParentContentToDifferentPage();
221  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
222  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
223 
224  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
225  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
226  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
227  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
228  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
229  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
230  }
231 
237  {
238  parent::moveParentContentToDifferentPageAndChangeSorting();
239  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
240  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
241 
242  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
243  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
244  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
245  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
246  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
247  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
248  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
249  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
250  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
251  }
252 
261  public function modifyPage()
262  {
263  parent::modifyPage();
264  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
265  $this->assertAssertionDataSet('modifyPage');
266 
267  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
268  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
269  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
270  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
271  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
272  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
273  }
274 
279  public function deletePage()
280  {
281  parent::deletePage();
282  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
283  $this->assertAssertionDataSet('deletePage');
284 
285  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, 0, 0, false);
286  $this->assertContains('PageNotFoundException', $response->getError());
287  }
288 
293  public function copyPage()
294  {
295  parent::copyPage();
296  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
297  $this->assertAssertionDataSet('copyPage');
298 
299  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
300  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
301  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
302  }
303 
309  {
310  parent::copyPageWithHotelBeforeParentContent();
311  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
312  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
313 
314  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
315  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
316  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
317  }
318 
328  {
329  parent::createParentContentWithHotelAndOfferChildren();
330  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
331  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
332 
333  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
334  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
335  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
336  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
337  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
338  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
339  }
340 
346  {
347  parent::createAndCopyParentContentWithHotelAndOfferChildren();
348  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
349  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
350 
351  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
352  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
353  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
354  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
355  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
356  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
357  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
358  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
359  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
360  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
361  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
362  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
363  }
364 
370  {
371  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
372  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
373  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
374 
375  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
376  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
377  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
378  }
379 
385  {
386  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
387  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
388  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
389 
390  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
391  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
392  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
393  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
394  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
395  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
396  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
397  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
398  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
399  }
400 
406  {
407  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
408  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
409  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
410 
411  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
412  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
413  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
414  }
415 
421  {
422  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
423  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
424  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
425 
426  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
427  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
428  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
429  }
430 
435  public function modifyOnlyHotelChild()
436  {
437  parent::modifyOnlyHotelChild();
438  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
439  $this->assertAssertionDataSet('modifyOnlyHotelChild');
440 
441  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
442  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
443  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
444  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
445  }
446 
452  {
453  parent::modifyParentAndChangeHotelChildrenSorting();
454  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
455  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
456 
457  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
458  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
459  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
460  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
461  }
462 
467  public function modifyParentWithHotelChild()
468  {
469  parent::modifyParentWithHotelChild();
470  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
471  $this->assertAssertionDataSet('modifyParentNHotelChild');
472 
473  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
474  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
475  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
476  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
477  }
478 
484  {
485  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
486  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
487  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
488 
489  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
490  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
491  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
492  // Discarding the parent shall not discard the child records
493  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
494  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
495  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
496  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
497  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
498  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
499  }
500 
506  {
507  parent::modifyParentWithHotelChildAndDiscardAll();
508  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
509  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
510 
511  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
512  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
513  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
514  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
515  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
516  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
517  }
518 
524  {
525  parent::modifyParentAndAddHotelChild();
526  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
527  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
528 
529  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
530  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
531  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
532  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
533  }
534 
540  {
541  parent::modifyParentAndDeleteHotelChild();
542  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
543  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
544 
545  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
546  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
547  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
548  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
549  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
550  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
551  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
552  }
553 
559  {
560  parent::modifyAndDiscardAndModifyParentWithHotelChild();
561  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
562  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
563 
564  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
565  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
566  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
567  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
568  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
569  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
570  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
571  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
572  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
573  }
574 }