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/Modify/DataSet/';
28 
37  public function createParentContent() {
38  parent::createParentContent();
39  $this->assertAssertionDataSet('createParentContent');
40 
41  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
42  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
43  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
44  }
45 
50  public function modifyParentContent() {
51  parent::modifyParentContent();
52  $this->assertAssertionDataSet('modifyParentContent');
53 
54  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
55  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
56  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
57  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
58  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
59  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
60  }
61 
66  public function deleteParentContent() {
67  parent::deleteParentContent();
68  $this->assertAssertionDataSet('deleteParentContent');
69 
70  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
71  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
72  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
73  }
74 
80  parent::deleteParentContentAndDiscardDeletedParent();
81  $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
82 
83  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
84  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
85  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
86  }
87 
92  public function copyParentContent() {
93  parent::copyParentContent();
94  $this->assertAssertionDataSet('copyParentContent');
95 
96  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
97  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
98  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
99  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
100  }
101 
107  parent::copyParentContentToDifferentPage();
108  $this->assertAssertionDataSet('copyParentContentToDifferentPage');
109 
110  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
111  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
112  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
113  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
114  }
115 
121  parent::localizeParentContentInKeepMode();
122  $this->assertAssertionDataSet('localizeParentContentKeep');
123 
124  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
125  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
126  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
127  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
128  }
129 
135  parent::localizeParentContentWithAllChildrenInKeepMode();
136  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
137 
138  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
139  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
140  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
141  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
142  }
143 
149  parent::localizeParentContentInSelectMode();
150  $this->assertAssertionDataSet('localizeParentContentSelect');
151 
152  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
153  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
154  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
155  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
156  }
157 
163  parent::localizeParentContentWithAllChildrenInSelectMode();
164  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
165 
166  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
167  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
168  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
169  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
170  }
171 
176  public function changeParentContentSorting() {
177  parent::changeParentContentSorting();
178  $this->assertAssertionDataSet('changeParentContentSorting');
179 
180  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
181  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
182  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
183  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
184  $this->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 
194  parent::moveParentContentToDifferentPage();
195  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
196 
197  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
198  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
199  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
200  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
201  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
202  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
203  }
204 
210  parent::moveParentContentToDifferentPageAndChangeSorting();
211  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
212 
213  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
214  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
215  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
216  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
217  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
218  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
219  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
220  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
221  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
222  }
223 
232  public function modifyPage() {
233  parent::modifyPage();
234  $this->assertAssertionDataSet('modifyPage');
235 
236  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
237  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
238  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
239  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
240  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
241  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
242  }
243 
248  public function deletePage() {
249  parent::deletePage();
250  $this->assertAssertionDataSet('deletePage');
251 
252  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId, FALSE);
253  $this->assertContains('RuntimeException', $response->getError());
254  }
255 
260  public function copyPage() {
261  parent::copyPage();
262  $this->assertAssertionDataSet('copyPage');
263 
264  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
265  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
266  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
267  }
268 
274  parent::copyPageWithHotelBeforeParentContent();
275  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
276 
277  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
278  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
279  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
280  }
281 
291  parent::createParentContentWithHotelAndOfferChildren();
292  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
293 
294  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
295  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
296  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
297  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
298  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
299  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
300  }
301 
307  parent::createAndCopyParentContentWithHotelAndOfferChildren();
308  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
309 
310  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
311  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
312  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
313  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
314  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
315  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
316  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
317  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
318  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
319  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
320  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
321  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
322  }
323 
329  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
330  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
331 
332  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
333  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
334  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
335  }
336 
342  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
343  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
344 
345  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
346  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
347  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
348  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
349  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
350  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
351  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
352  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
353  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
354  }
355 
361  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration();
362  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenWOSortBy');
363 
364  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
365  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
366  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
367  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
368  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
369  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
370  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
371  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
372  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
373  }
374 
380  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
381  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
382 
383  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
384  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
385  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
386  }
387 
393  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
394  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
395 
396  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
397  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
398  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
399  }
400 
405  public function modifyOnlyHotelChild() {
406  parent::modifyOnlyHotelChild();
407  $this->assertAssertionDataSet('modifyOnlyHotelChild');
408 
409  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
410  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
411  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
412  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
413  }
414 
420  parent::modifyParentAndChangeHotelChildrenSorting();
421  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
422 
423  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
424  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
425  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
426  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
427  }
428 
433  public function modifyParentWithHotelChild() {
434  parent::modifyParentWithHotelChild();
435  $this->assertAssertionDataSet('modifyParentNHotelChild');
436 
437  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
438  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
439  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
440  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
441  }
442 
448  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
449  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
450 
451  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
452  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
453  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
454  // Discarding the parent shall not discard the child records
455  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
456  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
457  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
458  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
459  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
460  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
461  }
462 
468  parent::modifyParentWithHotelChildAndDiscardAll();
469  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
470 
471  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
472  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
473  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
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', 'Hotel #2'));
477  }
478 
483  public function modifyParentAndAddHotelChild() {
484  parent::modifyParentAndAddHotelChild();
485  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
486 
487  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
488  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
489  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
490  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
491  }
492 
498  parent::modifyParentAndDeleteHotelChild();
499  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
500 
501  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
502  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
503  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
504  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
505  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
506  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
507  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
508  }
509 
515  parent::modifyAndDiscardAndModifyParentWithHotelChild();
516  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
517 
518  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()');
519  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
520  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
521  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
522  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
523  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
524  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
525  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
526  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
527  }
528 
529 }
getFrontendResponse($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=TRUE)