‪TYPO3CMS  10.4
ActionTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
20 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequestContext;
21 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
22 
27 {
31  protected ‪$assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/';
32 
36  protected ‪$assertCleanReferenceIndex = false;
37 
41  public function ‪createParentContent()
42  {
43  parent::createParentContent();
44  $this->‪assertAssertionDataSet('createParentContent');
45 
46  $response = $this->executeFrontendRequest(
47  (new InternalRequest())->withPageId(self::VALUE_PageId),
48  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
49  );
50  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
51  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
52  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
53  }
54 
58  public function ‪modifyParentContent()
59  {
60  parent::modifyParentContent();
61  $this->‪assertAssertionDataSet('modifyParentContent');
62 
63  $response = $this->executeFrontendRequest(
64  (new InternalRequest())->withPageId(self::VALUE_PageId),
65  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
66  );
67  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
68  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
69  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
70  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
71  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
72  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
73  }
74 
78  public function ‪deleteParentContent()
79  {
80  parent::deleteParentContent();
81  $this->‪assertAssertionDataSet('deleteParentContent');
82 
83  $response = $this->executeFrontendRequest(
84  (new InternalRequest())->withPageId(self::VALUE_PageId),
85  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
86  );
87  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
88  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
89  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
90  }
91 
95  public function ‪copyParentContent()
96  {
97  parent::copyParentContent();
98  $this->‪assertAssertionDataSet('copyParentContent');
99 
100  $response = $this->executeFrontendRequest(
101  (new InternalRequest())->withPageId(self::VALUE_PageId),
102  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
103  );
104  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
105  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
106  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
107  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
108  }
109 
113  public function ‪copyParentContentToDifferentPage()
114  {
115  parent::copyParentContentToDifferentPage();
116  $this->‪assertAssertionDataSet('copyParentContentToDifferentPage');
117 
118  $response = $this->executeFrontendRequest(
119  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
120  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
121  );
122  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
123  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
124  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
125  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
126  }
127 
132  {
133  // Create translated page first
134  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
135  parent::localizeParentContentWithAllChildren();
136  $this->‪assertAssertionDataSet('localizeParentContentWAllChildren');
137 
138  $response = $this->executeFrontendRequest(
139  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
140  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
141  );
142  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
143  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
144  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
145  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
146  }
147 
151  public function ‪changeParentContentSorting()
152  {
153  parent::changeParentContentSorting();
154  $this->‪assertAssertionDataSet('changeParentContentSorting');
155 
156  $response = $this->executeFrontendRequest(
157  (new InternalRequest())->withPageId(self::VALUE_PageId),
158  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
159  );
160  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
161  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
162  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
163  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
164  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
165  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
166  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
167  }
168 
172  public function ‪moveParentContentToDifferentPage()
173  {
174  parent::moveParentContentToDifferentPage();
175  $this->‪assertAssertionDataSet('moveParentContentToDifferentPage');
176 
177  $response = $this->executeFrontendRequest(
178  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
179  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
180  );
181  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
182  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
183  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
184  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
185  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
186  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
187  }
188 
193  {
194  parent::moveParentContentToDifferentPageTwice();
195  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageTwice');
196  }
197 
202  {
203  parent::moveParentContentToDifferentPageAndChangeSorting();
204  $this->‪assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting');
205 
206  $response = $this->executeFrontendRequest(
207  (new InternalRequest())->withPageId(self::VALUE_PageIdTarget),
208  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
209  );
210  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
211  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
212  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
213  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
214  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
215  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
216  self::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 
228  public function ‪modifyPage()
229  {
230  parent::modifyPage();
231  $this->‪assertAssertionDataSet('modifyPage');
232 
233  $response = $this->executeFrontendRequest(
234  (new InternalRequest())->withPageId(self::VALUE_PageId),
235  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
236  );
237  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
238  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
239  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
240  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
241  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
242  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
243  }
244 
248  public function ‪deletePage()
249  {
250  parent::deletePage();
251  $this->‪assertAssertionDataSet('deletePage');
252 
253  $response = $this->executeFrontendRequest(
254  (new InternalRequest())->withPageId(self::VALUE_PageId),
255  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
256  );
257  self::assertEquals(404, $response->getStatusCode());
258  }
259 
263  public function ‪copyPage()
264  {
265  parent::copyPage();
266  $this->‪assertAssertionDataSet('copyPage');
267  $response = $this->executeFrontendRequest(
268  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
269  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
270  );
271  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
272  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
273  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
274  }
275 
280  {
281  parent::copyPageWithHotelBeforeParentContent();
282  $this->‪assertAssertionDataSet('copyPageWHotelBeforeParentContent');
283 
284  $response = $this->executeFrontendRequest(
285  (new InternalRequest())->withPageId($this->recordIds['newPageId']),
286  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
287  );
288  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
289  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
290  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
291  }
292 
302  {
303  parent::changeHotelSortingWithOfferNotWorkspaceAware();
304  $this->‪assertAssertionDataSet('changeHotelSortingWithOfferNotWorkspaceAware');
305 
306  $response = $this->executeFrontendRequest(
307  (new InternalRequest())->withPageId(self::VALUE_PageId),
308  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
309  );
310  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
311  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
312  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
313  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
314  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
315  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.1'));
316  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
317  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdFirst)->setRecordField(self::FIELD_HotelOffer)
318  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1.2'));
319  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
320  ->setRecordIdentifier(self::TABLE_Hotel . ':' . self::VALUE_HotelIdSecond)->setRecordField(self::FIELD_HotelOffer)
321  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #2.1'));
322  }
323 
328  {
329  parent::createParentContentWithHotelAndOfferChildren();
330  $this->‪assertAssertionDataSet('createParentContentNHotelNOfferChildren');
331 
332  $response = $this->executeFrontendRequest(
333  (new InternalRequest())->withPageId(self::VALUE_PageId),
334  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
335  );
336  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
337  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
338  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
339  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
340  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
341  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
342  }
343 
348  {
349  parent::createAndCopyParentContentWithHotelAndOfferChildren();
350  $this->‪assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
351 
352  $response = $this->executeFrontendRequest(
353  (new InternalRequest())->withPageId(self::VALUE_PageId),
354  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
355  );
356  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
357  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
358  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
359  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
360  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
361  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
362  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
363  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
364  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
365  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
366  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
367  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
368  }
369 
374  {
375  // Create translated page first
376  $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
377  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
378  $this->‪assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren');
379 
380  $response = $this->executeFrontendRequest(
381  (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId),
382  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
383  );
384  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
385  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
386  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
387  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
388  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
389  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
390  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
391  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['localizedHotelId'])->setRecordField(self::FIELD_HotelOffer)
392  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
393  }
394 
398  public function ‪modifyOnlyHotelChild()
399  {
400  parent::modifyOnlyHotelChild();
401  $this->‪assertAssertionDataSet('modifyOnlyHotelChild');
402 
403  $response = $this->executeFrontendRequest(
404  (new InternalRequest())->withPageId(self::VALUE_PageId),
405  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
406  );
407  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
408  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
409  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
410  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
411  }
412 
417  {
418  parent::modifyParentAndChangeHotelChildrenSorting();
419  $this->‪assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting');
420 
421  $response = $this->executeFrontendRequest(
422  (new InternalRequest())->withPageId(self::VALUE_PageId),
423  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
424  );
425  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
426  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
427  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
428  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
429  }
430 
434  public function ‪modifyParentWithHotelChild()
435  {
436  parent::modifyParentWithHotelChild();
437  $this->‪assertAssertionDataSet('modifyParentNHotelChild');
438 
439  $response = $this->executeFrontendRequest(
440  (new InternalRequest())->withPageId(self::VALUE_PageId),
441  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
442  );
443  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
444  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
445  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
446  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
447  }
448 
452  public function ‪modifyParentAndAddHotelChild()
453  {
454  parent::modifyParentAndAddHotelChild();
455  $this->‪assertAssertionDataSet('modifyParentNAddHotelChild');
456 
457  $response = $this->executeFrontendRequest(
458  (new InternalRequest())->withPageId(self::VALUE_PageId),
459  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
460  );
461  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
462  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
463  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
464  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
465  }
466 
470  public function ‪modifyParentAndDeleteHotelChild()
471  {
472  parent::modifyParentAndDeleteHotelChild();
473  $this->‪assertAssertionDataSet('modifyParentNDeleteHotelChild');
474 
475  $response = $this->executeFrontendRequest(
476  (new InternalRequest())->withPageId(self::VALUE_PageId),
477  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
478  );
479  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
480  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
481  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
482  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
483  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
484  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
485  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
486  }
487 
492  {
493  parent::modifyAndDiscardAndModifyParentWithHotelChild();
494  $this->‪assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild');
495 
496  $response = $this->executeFrontendRequest(
497  (new InternalRequest())->withPageId(self::VALUE_PageId),
498  (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId)
499  );
500  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections();
501  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
502  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
503  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
504  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
505  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
506  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
507  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
508  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
509  }
510 }
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:246
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:190
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:450
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:289
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:305
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:111
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:199
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:489
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeHotelSortingWithOfferNotWorkspaceAware
‪changeHotelSortingWithOfferNotWorkspaceAware()
Definition: ActionTest.php:299
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:261
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify
Definition: ActionTest.php:16
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:313
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:345
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:468
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:39
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:56
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:414
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:226
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:277
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:93
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:371
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:432
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\$assertionDataSetDirectory
‪string $assertionDataSetDirectory
Definition: ActionTest.php:30
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\assertAssertionDataSet
‪assertAssertionDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:208
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:297
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\$assertCleanReferenceIndex
‪bool $assertCleanReferenceIndex
Definition: ActionTest.php:34
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:149
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase
Definition: AbstractActionTestCase.php:22
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:76
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest
Definition: ActionTest.php:27
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:129
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:170
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:396
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\Modify\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:325