‪TYPO3CMS  11.5
ActionTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
22 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequestContext;
23 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
24 
29 {
33  public function ‪verifyCleanReferenceIndex(): void
34  {
35  // The test verifies the imported data set has a clean reference index by the check in tearDown()
36  self::assertTrue(true);
37  }
38 
42  public function ‪createParentContent(): void
43  {
44  parent::createParentContent();
45  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
46  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv');
47 
48  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
49  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
50  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
51  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
52  }
53 
57  public function ‪modifyParentContent(): void
58  {
59  parent::modifyParentContent();
60  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
61  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv');
62 
63  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
64  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
65  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
66  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
67  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
68  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
69  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
70  }
71 
75  public function ‪deleteParentContent(): void
76  {
77  parent::deleteParentContent();
78  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
79  $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv');
80 
81  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
82  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
83  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
84  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
85  }
86 
90  public function ‪copyParentContent(): void
91  {
92  parent::copyParentContent();
93  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
94  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv');
95 
96  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
97  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
98  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
99  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
100  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
101  }
102 
106  public function ‪copyParentContentToDifferentPage(): void
107  {
108  parent::copyParentContentToDifferentPage();
109  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
110  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv');
111 
112  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
113  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
114  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
115  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
116  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
117  }
118 
123  {
124  // Create and publish translated page first
125  $translatedPageResult = $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
126  $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]);
127  parent::localizeParentContentWithAllChildren();
128  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
129  $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv');
130 
131  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
132  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
133  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
134  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
135  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
136  }
137 
141  public function ‪changeParentContentSorting(): void
142  {
143  parent::changeParentContentSorting();
144  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
145  $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv');
146 
147  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
148  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
149  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
150  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
151  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
152  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
153  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
154  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
155  }
156 
160  public function ‪moveParentContentToDifferentPage(): void
161  {
162  parent::moveParentContentToDifferentPage();
163  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
164  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv');
165 
166  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
167  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
168  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
169  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
170 
171  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
172  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
173  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
174  }
175 
180  {
181  parent::moveParentContentToDifferentPageTwice();
182  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
183  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv');
184  }
185 
190  {
191  parent::moveParentContentToDifferentPageAndChangeSorting();
192  $this->actionService->publishRecords(
193  [
194  self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast],
195  ]
196  );
197  $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv');
198 
199  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget));
200  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
201  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
202  ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2', 'Regular Element #1'));
203  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
204  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
205  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
206  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
207  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
208  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
209  }
210 
218  public function ‪modifyPage(): void
219  {
220  parent::modifyPage();
221  $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId);
222  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv');
223 
224  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
225  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
226  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
227  ->setTable(self::TABLE_Page)->setField('title')->setValues('Testing #1'));
228  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
229  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
230  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
231  }
232 
236  public function ‪deletePage(): void
237  {
238  parent::deletePage();
239  $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId);
240  $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv');
241 
242  $response = $this->executeFrontendSubRequest(
243  (new InternalRequest())->withPageId(self::VALUE_PageId)
244  );
245  self::assertEquals(404, $response->getStatusCode());
246  }
247 
251  public function ‪copyPage(): void
252  {
253  parent::copyPage();
254  $this->actionService->publishRecords(
255  [
256  self::TABLE_Page => [$this->recordIds['newPageId']],
257  self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']],
258  ]
259  );
260  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv');
261 
262  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
263  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
264  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
265  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
266  }
267 
272  {
273  parent::copyPageWithHotelBeforeParentContent();
274  $this->actionService->publishRecords(
275  [
276  self::TABLE_Page => [$this->recordIds['newPageId']],
277  self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']],
278  ]
279  );
280  $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv');
281 
282  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId']));
283  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
284  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
285  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2', 'Hotel #1'));
286  }
287 
296  {
297  parent::createParentContentWithHotelAndOfferChildren();
298  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
299  $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv');
300 
301  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
302  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
303  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
304  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
305  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
306  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
307  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
308  }
309 
314  {
315  parent::createAndCopyParentContentWithHotelAndOfferChildren();
316  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
317  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
318  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv');
319 
320  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
321  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
322  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
323  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
324  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
325  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
326  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
327  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
328  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)
329  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
330  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
331  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)
332  ->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
333  }
334 
339  {
340  // Create and publish translated page first
341  $translatedPageResult = $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
342  $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]);
343  parent::createAndLocalizeParentContentWithHotelAndOfferChildren();
344  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
345  $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
346  $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv');
347 
348  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId));
349  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
350  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
351  ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Testing #1'));
352  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
353  ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)
354  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
355  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
356  ->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['newHotelId'])->setRecordField(self::FIELD_HotelOffer)
357  ->setTable(self::TABLE_Offer)->setField('title')->setValues('[Translate to Dansk:] Offer #1'));
358  }
359 
363  public function ‪modifyOnlyHotelChild(): void
364  {
365  parent::modifyOnlyHotelChild();
366  $this->actionService->publishRecord(self::TABLE_Hotel, 4);
367  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv');
368 
369  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
370  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
371  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
372  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
373  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
374  }
375 
380  {
381  parent::modifyParentAndChangeHotelChildrenSorting();
382  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
383  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv');
384 
385  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
386  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
387  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
388  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
389  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2', 'Hotel #1'));
390  }
391 
395  public function ‪modifyParentWithHotelChild(): void
396  {
397  parent::modifyParentWithHotelChild();
398  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
399  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv');
400 
401  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
402  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
403  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
404  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)
405  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
406  }
407 
411  public function ‪modifyParentAndAddHotelChild(): void
412  {
413  parent::modifyParentAndAddHotelChild();
414  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
415  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv');
416 
417  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
418  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
419  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
420  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
421  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
422  }
423 
427  public function ‪modifyParentAndDeleteHotelChild(): void
428  {
429  parent::modifyParentAndDeleteHotelChild();
430  $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst);
431  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv');
432 
433  $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId));
434  $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()');
435  self::assertThat($responseSections, $this->‪getRequestSectionStructureHasRecordConstraint()
436  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
437  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
438  self::assertThat($responseSections, $this->‪getRequestSectionStructureDoesNotHaveRecordConstraint()
439  ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
440  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
441  }
442 
447  {
448  parent::modifyAndDiscardAndModifyParentWithHotelChild();
449  $this->actionService->publishRecords(
450  [
451  self::TABLE_Content => [self::VALUE_ContentIdFirst],
452  self::TABLE_Hotel => [3, 4],
453  ]
454  );
455  $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv');
456 
457  $response = $this->executeFrontendSubRequest(
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('Default', 'Extbase:list()');
462  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
463  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1'));
464  self::assertThat($responseSections, $this->‪getRequestSectionDoesNotHaveRecordConstraint()
465  ->setTable(self::TABLE_Hotel)->setField('header')->setValues('Testing #1'));
466  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
467  ->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #2'));
468  self::assertThat($responseSections, $this->‪getRequestSectionHasRecordConstraint()
469  ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #2'));
470  }
471 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionHasRecordConstraint
‪HasRecordConstraint getRequestSectionHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:245
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\createAndLocalizeParentContentWithHotelAndOfferChildren
‪createAndLocalizeParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:338
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyParentAndDeleteHotelChild
‪modifyParentAndDeleteHotelChild()
Definition: ActionTest.php:427
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureHasRecordConstraint
‪StructureHasRecordConstraint getRequestSectionStructureHasRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:261
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\moveParentContentToDifferentPage
‪moveParentContentToDifferentPage()
Definition: ActionTest.php:160
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: ActionTest.php:33
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\copyParentContent
‪copyParentContent()
Definition: ActionTest.php:90
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyParentContent
‪modifyParentContent()
Definition: ActionTest.php:57
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyPage
‪modifyPage()
Definition: ActionTest.php:218
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\localizeParentContentWithAllChildren
‪localizeParentContentWithAllChildren()
Definition: ActionTest.php:122
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionStructureDoesNotHaveRecordConstraint
‪StructureDoesNotHaveRecordConstraint getRequestSectionStructureDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:269
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\moveParentContentToDifferentPageTwice
‪moveParentContentToDifferentPageTwice()
Definition: ActionTest.php:179
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase
Definition: AbstractActionTestCase.php:24
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyOnlyHotelChild
‪modifyOnlyHotelChild()
Definition: ActionTest.php:363
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\deleteParentContent
‪deleteParentContent()
Definition: ActionTest.php:75
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\createAndCopyParentContentWithHotelAndOfferChildren
‪createAndCopyParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:313
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\moveParentContentToDifferentPageAndChangeSorting
‪moveParentContentToDifferentPageAndChangeSorting()
Definition: ActionTest.php:189
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\createParentContentWithHotelAndOfferChildren
‪createParentContentWithHotelAndOfferChildren()
Definition: ActionTest.php:295
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyParentWithHotelChild
‪modifyParentWithHotelChild()
Definition: ActionTest.php:395
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyParentAndAddHotelChild
‪modifyParentAndAddHotelChild()
Definition: ActionTest.php:411
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\getRequestSectionDoesNotHaveRecordConstraint
‪DoesNotHaveRecordConstraint getRequestSectionDoesNotHaveRecordConstraint()
Definition: AbstractDataHandlerActionTestCase.php:253
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\copyPage
‪copyPage()
Definition: ActionTest.php:251
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\deletePage
‪deletePage()
Definition: ActionTest.php:236
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\copyPageWithHotelBeforeParentContent
‪copyPageWithHotelBeforeParentContent()
Definition: ActionTest.php:271
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\changeParentContentSorting
‪changeParentContentSorting()
Definition: ActionTest.php:141
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyParentAndChangeHotelChildrenSorting
‪modifyParentAndChangeHotelChildrenSorting()
Definition: ActionTest.php:379
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish
Definition: ActionTest.php:18
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\createParentContent
‪createParentContent()
Definition: ActionTest.php:42
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\copyParentContentToDifferentPage
‪copyParentContentToDifferentPage()
Definition: ActionTest.php:106
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest\modifyAndDiscardAndModifyParentWithHotelChild
‪modifyAndDiscardAndModifyParentWithHotelChild()
Definition: ActionTest.php:446
‪TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Publish\ActionTest
Definition: ActionTest.php:29