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/CSV/PublishAll/DataSet/';
28 
33  public function setUp() {
34  parent::setUp();
35  }
36 
41  public function createParentContent() {
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  parent::modifyParentContent();
57  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
58  $this->assertAssertionDataSet('modifyParentContent');
59 
60  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
61  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
62  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
63  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
64  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
65  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
66  }
67 
72  public function deleteParentContent() {
73  parent::deleteParentContent();
74  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
75  $this->assertAssertionDataSet('deleteParentContent');
76 
77  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
78  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
79  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
80  }
81 
87  parent::deleteParentContentAndDiscardDeletedParent();
88  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
89  $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
90 
91  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
92  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
93  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
94  }
95 
100  public function copyParentContent() {
101  parent::copyParentContent();
102  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
103  $this->assertAssertionDataSet('copyParentContent');
104 
105  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
106  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
107  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
108  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
109  }
110 
116  parent::copyParentContentToDifferentPage();
117  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
118  $this->assertAssertionDataSet('copyParentContentToDifferentPage');
119 
120  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
121  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
122  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
123  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
124  }
125 
131  parent::localizeParentContentInKeepMode();
132  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
133  $this->assertAssertionDataSet('localizeParentContentKeep');
134 
135  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
136  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
137  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
138  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
139  }
140 
146  parent::localizeParentContentWithAllChildrenInKeepMode();
147  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
148  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
149 
150  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
151  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
152  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
153  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
154  }
155 
161  parent::localizeParentContentInSelectMode();
162  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
163  $this->assertAssertionDataSet('localizeParentContentSelect');
164 
165  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
166  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
167  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
168  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
169  }
170 
176  parent::localizeParentContentWithAllChildrenInSelectMode();
177  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
178  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
179 
180  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
181  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
182  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
183  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
184  }
185 
190  public function changeParentContentSorting() {
191  parent::changeParentContentSorting();
192  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
193  $this->assertAssertionDataSet('changeParentContentSorting');
194 
195  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
196  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
197  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
198  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
199  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
200  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
201  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
202  }
203 
209  parent::moveParentContentToDifferentPage();
210  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
211  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
212 
213  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
214  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
215  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
216  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
217  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
218  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
219  }
220 
226  parent::moveParentContentToDifferentPageAndChangeSorting();
227  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
228  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
229 
230  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
231  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
232  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
233  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
234  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
235  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
236  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
237  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
238  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
239  }
240 
249  public function modifyPage() {
250  parent::modifyPage();
251  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
252  $this->assertAssertionDataSet('modifyPage');
253 
254  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
255  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
256  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
257  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
258  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
259  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
260  }
261 
266  public function deletePage() {
267  parent::deletePage();
268  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
269  $this->assertAssertionDataSet('deletePage');
270 
271  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, 0, 0, FALSE);
272  $this->assertContains('PageNotFoundException', $response->getError());
273  }
274 
279  public function copyPage() {
280  parent::copyPage();
281  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
282  $this->assertAssertionDataSet('copyPage');
283 
284  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
285  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
286  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
287  }
288 
294  parent::copyPageWithHotelBeforeParentContent();
295  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
296  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
297 
298  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
299  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
300  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
301  }
302 
312  parent::createParentContentWithHotelAndOfferChildren();
313  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
314  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
315 
316  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
317  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
318  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
319  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
320  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
321  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
322  }
323 
329  parent::createAndCopyParentContentWithHotelAndOfferChildren();
330  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
331  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
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 (copy 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  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
340  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
341  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
342  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
343  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
344  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
345  }
346 
352  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
353  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
354  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
355 
356  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
357  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
358  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
359  }
360 
366  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
367  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
368  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
369 
370  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
371  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
372  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
373  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
374  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
375  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
376  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
377  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
378  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
379  }
380 
386  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
387  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
388  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
389 
390  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
391  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
392  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
393  }
394 
400  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
401  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
402  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
403 
404  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
405  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
406  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
407  }
408 
413  public function modifyOnlyHotelChild() {
414  parent::modifyOnlyHotelChild();
415  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
416  $this->assertAssertionDataSet('modifyOnlyHotelChild');
417 
418  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
419  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
420  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
421  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
422  }
423 
429  parent::modifyParentAndChangeHotelChildrenSorting();
430  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
431  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
432 
433  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
434  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
435  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
436  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
437  }
438 
443  public function modifyParentWithHotelChild() {
444  parent::modifyParentWithHotelChild();
445  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
446  $this->assertAssertionDataSet('modifyParentNHotelChild');
447 
448  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
449  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
450  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
451  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
452  }
453 
459  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
460  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
461  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
462 
463  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
464  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
465  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
466  // Discarding the parent shall not discard the child records
467  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
468  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
469  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
470  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
471  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
472  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
473  }
474 
480  parent::modifyParentWithHotelChildAndDiscardAll();
481  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
482  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
483 
484  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
485  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
486  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
487  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
488  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
489  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
490  }
491 
496  public function modifyParentAndAddHotelChild() {
497  parent::modifyParentAndAddHotelChild();
498  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
499  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
500 
501  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
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', 'Hotel #2'));
505  }
506 
512  parent::modifyParentAndDeleteHotelChild();
513  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
514  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
515 
516  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
517  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
518  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
519  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
520  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
521  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
522  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
523  }
524 
530  parent::modifyAndDiscardAndModifyParentWithHotelChild();
531  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
532  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
533 
534  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
535  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
536  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
537  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
538  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
539  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
540  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
541  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
542  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
543  }
544 
545 }
getFrontendResponse($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=TRUE)