[TASK] Extend DataHandler IRRE functional tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / Tests / Functional / DataHandling / IRRE / CSV / Modify / ActionTest.php
1 <?php
2 namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2014 Oliver Hader <oliver.hader@typo3.org>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 require_once dirname(dirname(__FILE__)) . '/AbstractActionTestCase.php';
28
29 /**
30 * Functional test for the DataHandler
31 */
32 class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase {
33
34 /**
35 * @var string
36 */
37 protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/';
38
39 /**
40 * Parent content records
41 */
42
43 /**
44 * @test
45 * @see DataSet/Assertion/createParentContentRecord.csv
46 */
47 public function createParentContent() {
48 parent::createParentContent();
49 $this->assertAssertionDataSet('createParentContent');
50
51 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
52 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1');
53 }
54
55 /**
56 * @test
57 * @see DataSet/Assertion/modifyParentContentRecord.csv
58 */
59 public function modifyParentContent() {
60 parent::modifyParentContent();
61 $this->assertAssertionDataSet('modifyParentContent');
62
63 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
64 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1');
65 $this->assertResponseContentStructureHasRecords(
66 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
67 self::TABLE_Hotel, 'title', array('Hotel #1')
68 );
69 }
70
71 /**
72 * @test
73 * @see DataSet/Assertion/deleteParentContentRecord.csv
74 */
75 public function deleteParentContent() {
76 parent::deleteParentContent();
77 $this->assertAssertionDataSet('deleteParentContent');
78
79 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
80 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Content, 'header', 'Regular Element #2');
81 }
82
83 /**
84 * @test
85 * @see DataSet/Assertion/deleteParentContentRecordAndDiscardDeletedParentRecord.csv
86 */
87 public function deleteParentContentAndDiscardDeletedParent() {
88 parent::deleteParentContentAndDiscardDeletedParent();
89 $this->assertAssertionDataSet('deleteParentContentNDiscardDeletedParent');
90
91 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
92 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Regular Element #2');
93 }
94
95 /**
96 * @test
97 * @see DataSet/Assertion/copyParentContentRecord.csv
98 */
99 public function copyParentContent() {
100 parent::copyParentContent();
101 $this->assertAssertionDataSet('copyParentContent');
102
103 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
104 $this->assertResponseContentStructureHasRecords(
105 $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
106 self::TABLE_Hotel, 'title', array('Hotel #1')
107 );
108 }
109
110 /**
111 * @test
112 * @see DataSet/copyParentContentToDifferentPage.csv
113 */
114 public function copyParentContentToDifferentPage() {
115 parent::copyParentContentToDifferentPage();
116 $this->assertAssertionDataSet('copyParentContentToDifferentPage');
117
118 $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
119 $this->assertResponseContentStructureHasRecords(
120 $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
121 self::TABLE_Hotel, 'title', array('Hotel #1')
122 );
123 }
124
125 /**
126 * @test
127 * @see DataSet/Assertion/localizeParentContentRecord.csv
128 */
129 public function localizeParentContent() {
130 parent::localizeParentContent();
131 $this->assertAssertionDataSet('localizeParentContent');
132
133 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
134 $this->assertResponseContentStructureHasRecords(
135 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
136 self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
137 );
138 }
139
140 /**
141 * @test
142 * @see DataSet/Assertion/changeParentContentRecordSorting.csv
143 */
144 public function changeParentContentSorting() {
145 parent::changeParentContentSorting();
146 $this->assertAssertionDataSet('changeParentContentSorting');
147
148 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
149 $this->assertResponseContentStructureHasRecords(
150 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
151 self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2')
152 );
153 $this->assertResponseContentStructureHasRecords(
154 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
155 self::TABLE_Hotel, 'title', array('Hotel #1')
156 );
157 }
158
159 /**
160 * @test
161 * @see DataSet/Assertion/moveParentContentRecordToDifferentPage.csv
162 */
163 public function moveParentContentToDifferentPage() {
164 parent::moveParentContentToDifferentPage();
165 $this->assertAssertionDataSet('moveParentContentToDifferentPage');
166
167 $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
168 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Regular Element #2');
169 $this->assertResponseContentStructureHasRecords(
170 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
171 self::TABLE_Hotel, 'title', array('Hotel #1')
172 );
173 }
174
175 /**
176 * @test
177 * @see DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv
178 */
179 public function moveParentContentToDifferentPageAndChangeSorting() {
180 parent::moveParentContentToDifferentPageAndChangeSorting();
181 $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
182
183 $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
184 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', array('Regular Element #2', 'Regular Element #1'));
185 $this->assertResponseContentStructureHasRecords(
186 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
187 self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2')
188 );
189 $this->assertResponseContentStructureHasRecords(
190 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
191 self::TABLE_Hotel, 'title', array('Hotel #1')
192 );
193 }
194
195 /**
196 * Page records
197 */
198
199 /**
200 * @test
201 * @see DataSet/Assertion/modifyPageRecord.csv
202 */
203 public function modifyPage() {
204 parent::modifyPage();
205 $this->assertAssertionDataSet('modifyPage');
206
207 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
208 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Page, 'title', 'Testing #1');
209 $this->assertResponseContentStructureHasRecords(
210 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
211 self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2')
212 );
213 }
214
215 /**
216 * @test
217 * @see DataSet/Assertion/deletePageRecord.csv
218 */
219 public function deletePage() {
220 parent::deletePage();
221 $this->assertAssertionDataSet('deletePage');
222
223 $response = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId, FALSE);
224 $this->assertContains('RuntimeException', $response->getError());
225 }
226
227 /**
228 * @test
229 * @see DataSet/Assertion/copyPageRecord.csv
230 */
231 public function copyPage() {
232 parent::copyPage();
233 $this->assertAssertionDataSet('copyPage');
234
235 $responseContent = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
236 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2', 'Hotel #1'));
237 }
238
239 /**
240 * @test
241 * @see DataSet/Assertion/copyPageWHotelBeforeParentContent.csv
242 */
243 public function copyPageWithHotelBeforeParentContent() {
244 parent::copyPageWithHotelBeforeParentContent();
245 $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent');
246
247 $responseContent = $this->getFrontendResponse($this->recordIds['newPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
248 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2', 'Hotel #1'));
249 }
250
251 /**
252 * IRRE Child Records
253 */
254
255 /**
256 * @test
257 * @see DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv
258 */
259 public function createParentContentWithHotelAndOfferChildren() {
260 parent::createParentContentWithHotelAndOfferChildren();
261 $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren');
262
263 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
264 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1');
265 $this->assertResponseContentStructureHasRecords(
266 $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
267 self::TABLE_Hotel, 'title', 'Hotel #1'
268 );
269 }
270
271 /**
272 * @test
273 * @see DataSet/Assertion/createAndCopyParentContentRecordWithHotelAndOfferChildRecords.csv
274 */
275 public function createAndCopyParentContentWithHotelAndOfferChildren() {
276 parent::createAndCopyParentContentWithHotelAndOfferChildren();
277 $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
278
279 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
280 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1 (copy 1)');
281 $this->assertResponseContentStructureHasRecords(
282 $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
283 self::TABLE_Hotel, 'title', 'Hotel #1'
284 );
285 $this->assertResponseContentStructureHasRecords(
286 $responseContent, self::TABLE_Content . ':' . $this->recordIds['copiedContentId'], self::FIELD_ContentHotel,
287 self::TABLE_Hotel, 'title', 'Hotel #1'
288 );
289 $this->assertResponseContentStructureHasRecords(
290 $responseContent, self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'], self::FIELD_HotelOffer,
291 self::TABLE_Offer, 'title', 'Offer #1'
292 );
293 }
294
295 /**
296 * @test
297 * @see DataSet/Assertion/createAndCopyParentContentRecordWithHotelAndOfferChildRecordsAndDiscardCopiedParentRecord.csv
298 */
299 public function createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent() {
300 parent::createAndCopyParentContentWithHotelAndOfferChildrenAndDiscardCopiedParent();
301 $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildrenNDiscardCopiedParent');
302
303 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
304 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1 (copy 1)');
305 }
306
307 /**
308 * @test
309 * @see DataSet/Assertion/createAndLocalizeParentContentRecordWithHotelAndOfferChildRecords.csv
310 */
311 public function createAndLocalizeParentContentWithHotelAndOfferChildren() {
312 parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
313 $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
314
315 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
316 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', '[Translate to Dansk:] Testing #1');
317 $this->assertResponseContentStructureHasRecords(
318 $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
319 self::TABLE_Hotel, 'title', '[Translate to Dansk:] Hotel #1'
320 );
321 $this->assertResponseContentStructureHasRecords(
322 $responseContent, self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'], self::FIELD_HotelOffer,
323 self::TABLE_Offer, 'title', '[Translate to Dansk:] Offer #1'
324 );
325 }
326
327 /**
328 * @test
329 * @see DataSet/Assertion/createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent.csv
330 */
331 public function createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent() {
332 parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardCreatedParent();
333 $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardCreatedParent');
334
335 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
336 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Content, 'header', array('Testing #1', '[Translate to Dansk:] Testing #1'));
337 }
338
339 /**
340 * @test
341 * @see DataSet/Assertion/createAndLocalizeParentContentRecordWithHotelAndOfferChildRecordsAndDiscardLocalizedParentRecord.csv
342 */
343 public function createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent() {
344 parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent();
345 $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenNDiscardLocalizedParent');
346
347 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
348 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Content, 'header', '[Translate to Dansk:] Testing #1');
349 }
350
351 /**
352 * @test
353 * @see DataSet/Assertion/modifyOnlyHotelChildRecord.csv
354 */
355 public function modifyOnlyHotelChild() {
356 parent::modifyOnlyHotelChild();
357 $this->assertAssertionDataSet('modifyOnlyHotelChild');
358
359 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
360 $this->assertResponseContentStructureHasRecords(
361 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
362 self::TABLE_Hotel, 'title', array('Hotel #1', 'Testing #1')
363 );
364 }
365
366 /**
367 * @test
368 * @see DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv
369 */
370 public function modifyParentAndChangeHotelChildrenSorting() {
371 parent::modifyParentAndChangeHotelChildrenSorting();
372 $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
373
374 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
375 $this->assertResponseContentStructureHasRecords(
376 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
377 self::TABLE_Hotel, 'title', array('Hotel #2', 'Hotel #1')
378 );
379 }
380
381 /**
382 * @test
383 * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv
384 */
385 public function modifyParentWithHotelChild() {
386 parent::modifyParentWithHotelChild();
387 $this->assertAssertionDataSet('modifyParentNHotelChild');
388
389 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
390 $this->assertResponseContentStructureHasRecords(
391 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
392 self::TABLE_Hotel, 'title', array('Hotel #1', 'Testing #1')
393 );
394 }
395
396 /**
397 * @test
398 * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecordAndDiscardModifiedParentRecord.csv
399 */
400 public function modifyParentWithHotelChildAndDiscardModifiedParent() {
401 parent::modifyParentWithHotelChildAndDiscardModifiedParent();
402 $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
403
404 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
405 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Regular Element #1');
406 // Discarding the parent shall not discard the child records
407 $this->assertResponseContentStructureHasRecords(
408 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
409 self::TABLE_Hotel, 'title', array('Hotel #1', 'Testing #1')
410 );
411 $this->assertResponseContentStructureDoesNotHaveRecords(
412 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
413 self::TABLE_Hotel, 'title', 'Hotel #2'
414 );
415 }
416
417 /**
418 * @test
419 * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecordAndDiscardAllModifiedRecords.csv
420 */
421 public function modifyParentWithHotelChildAndDiscardAll() {
422 parent::modifyParentWithHotelChildAndDiscardAll();
423 $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardAll');
424
425 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
426 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Regular Element #1');
427 $this->assertResponseContentStructureHasRecords(
428 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdFirst, self::FIELD_ContentHotel,
429 self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2')
430 );
431 }
432
433 /**
434 * @test
435 * @see DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv
436 */
437 public function modifyParentAndAddHotelChild() {
438 parent::modifyParentAndAddHotelChild();
439 $this->assertAssertionDataSet('modifyParentNAddHotelChild');
440
441 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
442 $this->assertResponseContentStructureHasRecords(
443 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
444 self::TABLE_Hotel, 'title', array('Hotel #1', 'Hotel #2')
445 );
446 }
447
448 /**
449 * @test
450 * @see DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv
451 */
452 public function modifyParentAndDeleteHotelChild() {
453 parent::modifyParentAndDeleteHotelChild();
454 $this->assertAssertionDataSet('modifyParentNDeleteHotelChild');
455
456 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
457 $this->assertResponseContentStructureHasRecords(
458 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
459 self::TABLE_Hotel, 'title', 'Hotel #1'
460 );
461 $this->assertResponseContentStructureDoesNotHaveRecords(
462 $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
463 self::TABLE_Hotel, 'title', 'Hotel #2'
464 );
465 }
466
467 /**
468 * @test
469 * @see DataSet/modifyNDiscardNModifyParentWHotelChild.csv
470 */
471 public function modifyAndDiscardAndModifyParentWithHotelChild() {
472 parent::modifyAndDiscardAndModifyParentWithHotelChild();
473 $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
474
475 $responseContent = $this->getFrontendResponse(self::VALUE_PageId, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
476 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1');
477 $this->assertResponseContentDoesNotHaveRecords($responseContent, self::TABLE_Hotel, 'header', 'Testing #1');
478 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #2');
479 $this->assertResponseContentHasRecords($responseContent, self::TABLE_Hotel, 'title', 'Testing #2');
480 }
481
482 }