TYPO3 CMS  TYPO3_6-2
ActionTest.php
Go to the documentation of this file.
1 <?php
3 
17 require_once dirname(dirname(__FILE__)) . '/AbstractActionTestCase.php';
18 
23 
27  protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/';
28 
37  public function createParentContent() {
38  parent::createParentContent();
39  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
40  $this->assertAssertionDataSet('createParentContent');
41 
42  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
43  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
44  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
45  }
46 
51  public function modifyParentContent() {
52  parent::modifyParentContent();
53  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
54  $this->assertAssertionDataSet('modifyParentContent');
55 
56  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
57  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
58  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
59  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
60  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
61  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
62  }
63 
68  public function deleteParentContent() {
69  parent::deleteParentContent();
70  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
71  $this->assertAssertionDataSet('deleteParentContent');
72 
73  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
74  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
75  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
76  }
77 
83  parent::deleteParentContentAndDiscardDeletedParent();
84  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
85  $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
86 
87  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
88  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
89  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
90  }
91 
96  public function copyParentContent() {
97  parent::copyParentContent();
98  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
99  $this->assertAssertionDataSet('copyParentContent');
100 
101  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
102  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
103  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
104  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
105  }
106 
112  parent::copyParentContentToDifferentPage();
113  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
114  $this->assertAssertionDataSet('copyParentContentToDifferentPage');
115 
116  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections('Default', 'Extbase:list()');
117  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
118  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
119  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
120  }
121 
127  parent::localizeParentContentInKeepMode();
128  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
129  $this->assertAssertionDataSet('localizeParentContentKeep');
130 
131  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
132  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
133  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
134  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
135  }
136 
142  parent::localizeParentContentWithAllChildrenInKeepMode();
143  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
144  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
145 
146  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
147  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
148  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
149  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
150  }
151 
157  parent::localizeParentContentInSelectMode();
158  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
159  $this->assertAssertionDataSet('localizeParentContentSelect');
160 
161  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
162  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
163  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
164  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
165  }
166 
172  parent::localizeParentContentWithAllChildrenInSelectMode();
173  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
174  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
175 
176  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
177  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
178  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
179  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
180  }
181 
186  public function changeParentContentSorting() {
187  parent::changeParentContentSorting();
188  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
189  $this->assertAssertionDataSet('changeParentContentSorting');
190 
191  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
192  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
193  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
194  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
195  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
196  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
197  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
198  }
199 
205  parent::moveParentContentToDifferentPage();
206  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
207  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
208 
209  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections('Default', 'Extbase:list()');
210  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
211  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
212 
213  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
214  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
215  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
216  }
217 
223  parent::moveParentContentToDifferentPageAndChangeSorting();
224  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
225  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
226 
227  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections('Default', 'Extbase:list()');
228  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
229  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
230  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
231  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
232  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
233  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
234  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
235  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
236  }
237 
246  public function modifyPage() {
247  parent::modifyPage();
248  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
249  $this->assertAssertionDataSet('modifyPage');
250 
251  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
252  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
253  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
254  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
255  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
256  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
257  }
258 
263  public function deletePage() {
264  parent::deletePage();
265  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
266  $this->assertAssertionDataSet('deletePage');
267 
268  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, 0, 0, FALSE);
269  $this->assertContains('PageNotFoundException', $response->getError());
270  }
271 
276  public function copyPage() {
277  parent::copyPage();
278  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
279  $this->assertAssertionDataSet('copyPage');
280 
281  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections('Default', 'Extbase:list()');
282  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
283  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
284  }
285 
291  parent::copyPageWithHotelBeforeParentContent();
292  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
293  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
294 
295  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections('Default', 'Extbase:list()');
296  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
297  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
298  }
299 
309  parent::createParentContentWithHotelAndOfferChildren();
310  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
311  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
312 
313  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
314  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
315  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
316  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
317  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
318  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
319  }
320 
326  parent::createAndCopyParentContentWithHotelAndOfferChildren();
327  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
328  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
329 
330  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
331  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
332  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
333  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
334  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
335  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
336  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
337  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
338  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
339  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
340  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
341  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
342  }
343 
349  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
350  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
351  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
352 
353  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
354  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
355  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
356  }
357 
363  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
364  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
365  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
366 
367  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
368  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
369  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
370  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
371  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
372  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
373  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
374  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
375  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
376  }
377 
383  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
384  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
385  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
386 
387  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
388  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
389  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
390  }
391 
397  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
398  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
399  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
400 
401  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
402  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
403  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
404  }
405 
410  public function modifyOnlyHotelChild() {
411  parent::modifyOnlyHotelChild();
412  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
413  $this->assertAssertionDataSet('modifyOnlyHotelChild');
414 
415  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
416  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
417  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
418  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
419  }
420 
426  parent::modifyParentAndChangeHotelChildrenSorting();
427  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
428  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
429 
430  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
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  parent::modifyParentWithHotelChild();
442  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
443  $this->assertAssertionDataSet('modifyParentNHotelChild');
444 
445  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
446  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
447  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
448  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
449  }
450 
456  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
457  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
458  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
459 
460  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
461  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
462  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
463  // Discarding the parent shall not discard the child records
464  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
465  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
466  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
467  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
468  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
469  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
470  }
471 
477  parent::modifyParentWithHotelChildAndDiscardAll();
478  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
479  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
480 
481  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
482  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
483  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
484  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
485  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
486  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
487  }
488 
493  public function modifyParentAndAddHotelChild() {
494  parent::modifyParentAndAddHotelChild();
495  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
496  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
497 
498  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
499  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
500  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
501  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
502  }
503 
509  parent::modifyParentAndDeleteHotelChild();
510  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
511  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
512 
513  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections('Default', 'Extbase:list()');
514  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
515  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
516  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
517  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
518  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
519  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
520  }
521 
527  parent::modifyAndDiscardAndModifyParentWithHotelChild();
528  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
529  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
530 
531  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
532  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
533  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
534  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
535  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
536  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
537  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
538  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
539  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
540  }
541 
542 }
getFrontendResponse($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=TRUE)