TYPO3 CMS  TYPO3_7-6
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/Modify/DataSet/';
26 
35  public function createParentContent()
36  {
37  parent::createParentContent();
38  $this->assertAssertionDataSet('createParentContent');
39 
40  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
41  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
42  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
43  }
44 
49  public function modifyParentContent()
50  {
51  parent::modifyParentContent();
52  $this->assertAssertionDataSet('modifyParentContent');
53 
54  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
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  {
68  parent::deleteParentContent();
69  $this->assertAssertionDataSet('deleteParentContent');
70 
71  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
72  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
73  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
74  }
75 
81  {
82  parent::deleteParentContentAndDiscardDeletedParent();
83  $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
84 
85  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
86  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
87  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
88  }
89 
94  public function copyParentContent()
95  {
96  parent::copyParentContent();
97  $this->assertAssertionDataSet('copyParentContent');
98 
99  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
100  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
101  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
102  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
103  }
104 
110  {
111  parent::copyParentContentToDifferentPage();
112  $this->assertAssertionDataSet('copyParentContentToDifferentPage');
113 
114  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
115  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
116  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
117  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
118  }
119 
125  {
126  parent::localizeParentContentInKeepMode();
127  $this->assertAssertionDataSet('localizeParentContentKeep');
128 
129  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
130  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
131  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
132  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
133  }
134 
140  {
141  parent::localizeParentContentWithAllChildrenInKeepMode();
142  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
143 
144  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
145  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
146  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
147  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
148  }
149 
155  {
156  parent::localizeParentContentInSelectMode();
157  $this->assertAssertionDataSet('localizeParentContentSelect');
158 
159  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
160  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
161  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
162  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
163  }
164 
170  {
171  parent::localizeParentContentWithAllChildrenInSelectMode();
172  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
173 
174  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
175  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
176  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
177  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
178  }
179 
184  public function changeParentContentSorting()
185  {
186  parent::changeParentContentSorting();
187  $this->assertAssertionDataSet('changeParentContentSorting');
188 
189  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
190  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
191  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
192  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
193  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
194  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
195  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
196  }
197 
203  {
204  parent::moveParentContentToDifferentPage();
205  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
206 
207  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
208  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
209  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
210  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
211  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
212  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
213  }
214 
220  {
221  parent::moveParentContentToDifferentPageAndChangeSorting();
222  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
223 
224  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
225  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
226  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
227  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
228  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
229  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
230  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
231  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
232  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
233  }
234 
243  public function modifyPage()
244  {
245  parent::modifyPage();
246  $this->assertAssertionDataSet('modifyPage');
247 
248  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
249  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
250  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
251  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
252  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
253  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
254  }
255 
260  public function deletePage()
261  {
262  parent::deletePage();
263  $this->assertAssertionDataSet('deletePage');
264 
265  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId, false);
266  $this->assertContains('RuntimeException', $response->getError());
267  }
268 
273  public function copyPage()
274  {
275  parent::copyPage();
276  $this->assertAssertionDataSet('copyPage');
277 
278  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
279  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
280  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
281  }
282 
288  {
289  parent::copyPageWithHotelBeforeParentContent();
290  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
291 
292  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
293  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
294  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
295  }
296 
306  {
307  parent::createParentContentWithHotelAndOfferChildren();
308  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
309 
310  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
311  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
312  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #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  }
317 
323  {
324  parent::createAndCopyParentContentWithHotelAndOfferChildren();
325  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
326 
327  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
328  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
329  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
330  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
331  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
332  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
333  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
334  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
335  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
336  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
337  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
338  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
339  }
340 
346  {
347  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
348  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
349 
350  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
351  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
352  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
353  }
354 
360  {
361  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
362  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
363 
364  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
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['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
372  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
373  }
374 
380  {
381  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
382  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
383 
384  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
385  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
386  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
387  }
388 
394  {
395  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
396  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
397 
398  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
399  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
400  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
401  }
402 
407  public function modifyOnlyHotelChild()
408  {
409  parent::modifyOnlyHotelChild();
410  $this->assertAssertionDataSet('modifyOnlyHotelChild');
411 
412  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
413  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
414  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
415  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
416  }
417 
423  {
424  parent::modifyParentAndChangeHotelChildrenSorting();
425  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
426 
427  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
428  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
429  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
430  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
431  }
432 
437  public function modifyParentWithHotelChild()
438  {
439  parent::modifyParentWithHotelChild();
440  $this->assertAssertionDataSet('modifyParentNHotelChild');
441 
442  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
443  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
444  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
445  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
446  }
447 
453  {
454  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
455  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
456 
457  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
458  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
459  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
460  // Discarding the parent shall not discard the child records
461  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
462  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
463  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
464  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
465  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
466  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
467  }
468 
474  {
475  parent::modifyParentWithHotelChildAndDiscardAll();
476  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
477 
478  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
479  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
480  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
481  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
482  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
483  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
484  }
485 
491  {
492  parent::modifyParentAndAddHotelChild();
493  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
494 
495  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
496  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
497  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
498  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
499  }
500 
506  {
507  parent::modifyParentAndDeleteHotelChild();
508  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
509 
510  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
511  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
512  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
513  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
514  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
515  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
516  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
517  }
518 
524  {
525  parent::modifyAndDiscardAndModifyParentWithHotelChild();
526  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
527 
528  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
529  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
530  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
531  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
532  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
533  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
534  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
535  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
536  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
537  }
538 }
getFrontendResponse($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=true, $frontendUserId=0)