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/PublishAll/DataSet/';
26 
30  protected function setUp()
31  {
32  parent::setUp();
33  }
34 
39  public function createParentContent()
40  {
41  parent::createParentContent();
42  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
43  $this->assertAssertionDataSet('createParentContent');
44 
45  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
46  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
47  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
48  }
49 
54  public function modifyParentContent()
55  {
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  {
74  parent::deleteParentContent();
75  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
76  $this->assertAssertionDataSet('deleteParentContent');
77 
78  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
79  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
80  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
81  }
82 
88  {
89  parent::deleteParentContentAndDiscardDeletedParent();
90  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
91  $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
92 
93  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
94  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
95  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
96  }
97 
102  public function copyParentContent()
103  {
104  parent::copyParentContent();
105  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
106  $this->assertAssertionDataSet('copyParentContent');
107 
108  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
109  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
110  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
111  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
112  }
113 
119  {
120  parent::copyParentContentToDifferentPage();
121  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
122  $this->assertAssertionDataSet('copyParentContentToDifferentPage');
123 
124  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
125  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
126  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
127  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
128  }
129 
135  {
136  parent::localizeParentContentInKeepMode();
137  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
138  $this->assertAssertionDataSet('localizeParentContentKeep');
139 
140  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
141  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
142  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
143  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
144  }
145 
151  {
152  parent::localizeParentContentWithAllChildrenInKeepMode();
153  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
154  $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
155 
156  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
157  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
158  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
159  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
160  }
161 
167  {
168  parent::localizeParentContentInSelectMode();
169  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
170  $this->assertAssertionDataSet('localizeParentContentSelect');
171 
172  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
173  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
174  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
175  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
176  }
177 
183  {
184  parent::localizeParentContentWithAllChildrenInSelectMode();
185  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
186  $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
187 
188  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
189  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
190  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
191  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
192  }
193 
198  public function changeParentContentSorting()
199  {
200  parent::changeParentContentSorting();
201  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
202  $this->assertAssertionDataSet('changeParentContentSorting');
203 
204  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
205  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
206  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
207  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
208  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
209  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
210  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
211  }
212 
218  {
219  parent::moveParentContentToDifferentPage();
220  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
221  $this->assertAssertionDataSet('moveParentContentToDifferentPage');
222 
223  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
224  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
225  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
226  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
227  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
228  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
229  }
230 
236  {
237  parent::moveParentContentToDifferentPageAndChangeSorting();
238  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
239  $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
240 
241  $responseSections = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseSections();
242  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
243  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
244  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
245  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
246  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
247  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
248  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
249  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
250  }
251 
260  public function modifyPage()
261  {
262  parent::modifyPage();
263  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
264  $this->assertAssertionDataSet('modifyPage');
265 
266  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
267  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
268  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
269  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
270  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
271  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
272  }
273 
278  public function deletePage()
279  {
280  parent::deletePage();
281  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
282  $this->assertAssertionDataSet('deletePage');
283 
284  $response = $this->getFrontendResponse(self::VALUE_PageId, 0, 0, 0, false);
285  $this->assertContains('PageNotFoundException', $response->getError());
286  }
287 
292  public function copyPage()
293  {
294  parent::copyPage();
295  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
296  $this->assertAssertionDataSet('copyPage');
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 
308  {
309  parent::copyPageWithHotelBeforeParentContent();
310  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
311  $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
312 
313  $responseSections = $this->getFrontendResponse($this->recordIds['newPageId'], 0)->getResponseSections();
314  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
315  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
316  }
317 
327  {
328  parent::createParentContentWithHotelAndOfferChildren();
329  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
330  $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
331 
332  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
333  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
334  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
335  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
336  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
337  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
338  }
339 
345  {
346  parent::createAndCopyParentContentWithHotelAndOfferChildren();
347  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
348  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
349 
350  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
351  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
352  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
353  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
354  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
355  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
356  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
357  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
358  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
359  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
360  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
361  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
362  }
363 
369  {
370  parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
371  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
372  $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
373 
374  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
375  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
376  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
377  }
378 
384  {
385  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
386  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
387  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
388 
389  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
390  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
391  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
392  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
393  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
394  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
395  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
396  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
397  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
398  }
399 
405  {
406  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
407  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
408  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
409 
410  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
411  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
412  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1', '[Translate to Dansk:] Testing #1'));
413  }
414 
420  {
421  parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
422  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
423  $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
424 
425  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
426  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
427  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
428  }
429 
434  public function modifyOnlyHotelChild()
435  {
436  parent::modifyOnlyHotelChild();
437  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
438  $this->assertAssertionDataSet('modifyOnlyHotelChild');
439 
440  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
441  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
442  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
443  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
444  }
445 
451  {
452  parent::modifyParentAndChangeHotelChildrenSorting();
453  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
454  $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
455 
456  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
457  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
458  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
459  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
460  }
461 
466  public function modifyParentWithHotelChild()
467  {
468  parent::modifyParentWithHotelChild();
469  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
470  $this->assertAssertionDataSet('modifyParentNHotelChild');
471 
472  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
473  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
474  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
475  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
476  }
477 
483  {
484  parent::modifyParentWithHotelChildAndDiscardModifiedParent();
485  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
486  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
487 
488  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
489  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
490  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
491  // Discarding the parent shall not discard the child records
492  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
493  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
494  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
495  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
496  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
497  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
498  }
499 
505  {
506  parent::modifyParentWithHotelChildAndDiscardAll();
507  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
508  $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
509 
510  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
511  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
512  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
513  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
514  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
515  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
516  }
517 
523  {
524  parent::modifyParentAndAddHotelChild();
525  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
526  $this->assertAssertionDataSet('modifyParentNAddHotelChild');
527 
528  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
529  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
530  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
531  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
532  }
533 
539  {
540  parent::modifyParentAndDeleteHotelChild();
541  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
542  $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
543 
544  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
545  $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
546  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
547  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
548  $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
549  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
550  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
551  }
552 
558  {
559  parent::modifyAndDiscardAndModifyParentWithHotelChild();
560  $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
561  $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
562 
563  $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
564  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
565  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
566  $this->assertThat($responseSections, $this->getRequestSectionDoesNotHaveRecordConstraint()
567  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
568  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
569  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
570  $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
571  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
572  }
573 }
getFrontendResponse($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=true, $frontendUserId=0)