‪TYPO3CMS  ‪main
RootlineUtilityTest.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 
20 use PHPUnit\Framework\Attributes\DataProvider;
21 use PHPUnit\Framework\Attributes\Test;
32 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
33 
34 final class ‪RootlineUtilityTest extends FunctionalTestCase
35 {
37 
38  protected const ‪LANGUAGE_PRESETS = [
39  'EN' => ['id' => 0, 'title' => 'English', 'locale' => 'en_US.UTF8'],
40  'FR' => ['id' => 1, 'title' => 'French', 'locale' => 'fr_FR.UTF8'],
41  ];
42 
43  protected array ‪$coreExtensionsToLoad = ['workspaces'];
44  protected array ‪$testExtensionsToLoad = [
45  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_rootlineutility',
46  ];
47  protected array ‪$configurationToUseInTestInstance = [
48  'FE' => [
49  'addRootLineFields' => 'categories,categories_other,tx_testrootlineutility_hotels',
50  ],
51  ];
52 
53  protected function ‪setUp(): void
54  {
55  parent::setUp();
57  'main',
58  $this->‪buildSiteConfiguration(1, 'https://acme.com/'),
59  [
60  $this->‪buildDefaultLanguageConfiguration('EN', '/'),
61  $this->‪buildLanguageConfiguration('FR', '/fr/', ['EN']),
62  ]
63  );
64  self::importCSVDataSet(__DIR__ . '/Fixtures/RootlineUtilityImport.csv');
65  }
66 
67  private function ‪filterExpectedValues(array $incomingData, array ‪$fields): array
68  {
69  $result = [];
70  foreach ($incomingData as $pos => $values) {
71  $filteredValues = [];
72  foreach (‪$fields as $field) {
73  if (isset($values[$field])) {
74  $filteredValues[$field] = $values[$field];
75  }
76  }
77  $result[$pos] = $filteredValues;
78  }
79  return $result;
80  }
81 
82  #[Test]
83  public function ‪verifyCleanReferenceIndex()
84  {
85  // Fix refindex, then compare with import csv again to verify nothing changed.
86  // This is to make sure the import csv is 'clean' - important for the other tests.
87  $this->get(ReferenceIndex::class)->updateIndex(false);
88  $this->assertCSVDataSet(__DIR__ . '/Fixtures/RootlineUtilityImport.csv');
89  }
90 
91  #[Test]
93  {
94  $subject = new ‪RootlineUtility(1, '', new ‪Context());
95  $subjectMethodReflection = (new \ReflectionMethod($subject, 'isMountedPage'));
96  self::assertFalse($subjectMethodReflection->invoke($subject));
97  }
98 
99  #[Test]
101  {
102  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
103  $subjectMethodReflection = (new \ReflectionMethod($subject, 'isMountedPage'));
104  self::assertTrue($subjectMethodReflection->invoke($subject));
105  }
106 
107  #[Test]
109  {
110  $subject = new ‪RootlineUtility(1, '99-99', new ‪Context());
111  $subjectMethodReflection = (new \ReflectionMethod($subject, 'isMountedPage'));
112  self::assertFalse($subjectMethodReflection->invoke($subject));
113  }
114 
115  #[Test]
117  {
118  $this->expectException(\RuntimeException::class);
119  $this->expectExceptionCode(1343464100);
120  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
121  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
122  $subjectMethodReflection->invoke($subject, ['uid' => 1], ['uid' => 99, 'doktype' => ‪PageRepository::DOKTYPE_DEFAULT]);
123  }
124 
125  #[Test]
127  {
128  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
129  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
130  $result = $subjectMethodReflection->invoke(
131  $subject,
132  ['uid' => 1],
133  ['uid' => 99, 'doktype' => ‪PageRepository::DOKTYPE_MOUNTPOINT, 'mount_pid' => 1]
134  );
135  self::assertNotEmpty($result);
136  }
137 
138  #[Test]
140  {
141  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
142  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
143  $result = $subjectMethodReflection->invoke(
144  $subject,
145  ['uid' => 1],
146  ['uid' => 99, 'doktype' => ‪PageRepository::DOKTYPE_MOUNTPOINT, 'mount_pid' => 1]
147  );
148  self::assertTrue(isset($result['_MOUNTED_FROM']));
149  self::assertSame(1, $result['_MOUNTED_FROM']);
150  }
151 
152  #[Test]
154  {
155  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
156  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
157  $result = $subjectMethodReflection->invoke(
158  $subject,
159  ['uid' => 1],
160  ['uid' => 99, 'doktype' => ‪PageRepository::DOKTYPE_MOUNTPOINT, 'mount_pid' => 1]
161  );
162  self::assertTrue(isset($result['_MP_PARAM']));
163  self::assertSame('1-99', $result['_MP_PARAM']);
164  }
165 
166  #[Test]
168  {
169  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
170  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
171  $result = $subjectMethodReflection->invoke(
172  $subject,
173  ['uid' => 1],
174  ['uid' => 99, 'doktype' => ‪PageRepository::DOKTYPE_MOUNTPOINT, 'mount_pid' => 1, 'mount_pid_ol' => 1]
175  );
176  self::assertTrue(isset($result['_MOUNT_OL']));
177  self::assertTrue($result['_MOUNT_OL']);
178  }
179 
180  #[Test]
182  {
183  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
184  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
185  $result = $subjectMethodReflection->invoke(
186  $subject,
187  ['uid' => 1],
188  [
189  'uid' => 99,
191  'mount_pid' => 1,
192  'mount_pid_ol' => 1,
193  'pid' => 5,
194  'title' => 'TestCase',
195  ]
196  );
197  self::assertTrue(isset($result['_MOUNT_PAGE']));
198  self::assertSame(['uid' => 99, 'pid' => 5, 'title' => 'TestCase'], $result['_MOUNT_PAGE']);
199  }
200 
201  #[Test]
203  {
204  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
205  $subjectMethodReflection = (new \ReflectionMethod($subject, 'processMountedPage'));
206  $mountPointPageData = [
207  'uid' => 99,
209  'mount_pid' => 1,
210  'mount_pid_ol' => 0,
211  ];
212  $result = $subjectMethodReflection->invoke(
213  $subject,
214  ['uid' => 1],
215  $mountPointPageData
216  );
217  // Tests that $mountPointPageData is completely part of $result and keys match.
218  self::assertSame($mountPointPageData, array_intersect_assoc($mountPointPageData, $result));
219  }
220 
221  #[Test]
223  {
224  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
225  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
226  self::assertFalse($subjectMethodReflection->invoke(
227  $subject,
228  [
229  'config' => [
230  'type' => 'group',
231  ],
232  ]
233  ));
234  }
235 
236  #[Test]
238  {
239  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
240  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
241  self::assertTrue($subjectMethodReflection->invoke(
242  $subject,
243  [
244  'config' => [
245  'type' => 'group',
246  'MM' => 'tx_xyz',
247  ],
248  ]
249  ));
250  }
251 
252  #[Test]
254  {
255  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
256  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
257  self::assertFalse($subjectMethodReflection->invoke(
258  $subject,
259  [
260  'config' => [
261  'type' => 'inline',
262  ],
263  ]
264  ));
265  }
266 
267  #[Test]
269  {
270  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
271  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
272  self::assertTrue($subjectMethodReflection->invoke(
273  $subject,
274  [
275  'config' => [
276  'type' => 'inline',
277  'foreign_field' => 'xyz',
278  ],
279  ]
280  ));
281  }
282 
283  #[Test]
285  {
286  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
287  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
288  self::assertTrue($subjectMethodReflection->invoke(
289  $subject,
290  [
291  'config' => [
292  'type' => 'inline',
293  'MM' => 'xyz',
294  ],
295  ]
296  ));
297  }
298 
299  #[Test]
301  {
302  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
303  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
304  self::assertFalse($subjectMethodReflection->invoke(
305  $subject,
306  [
307  'config' => [
308  'type' => 'select',
309  ],
310  ]
311  ));
312  }
313 
314  #[Test]
316  {
317  $subject = new ‪RootlineUtility(1, '1-99', new ‪Context());
318  $subjectMethodReflection = (new \ReflectionMethod($subject, 'columnHasRelationToResolve'));
319  self::assertTrue($subjectMethodReflection->invoke(
320  $subject,
321  [
322  'config' => [
323  'type' => 'select',
324  'MM' => 'xyz',
325  ],
326  ]
327  ));
328  }
329 
330  #[Test]
332  {
333  $cacheFrontend = new ‪NullFrontend('some-frontend');
334  $context = new ‪Context();
335  $context->setAspect('workspace', new ‪WorkspaceAspect(15));
336  $context->setAspect('visibility', new ‪VisibilityAspect(true));
337  $context->setAspect('language', new ‪LanguageAspect(8, 8, ‪LanguageAspect::OVERLAYS_OFF));
338  $subject = new ‪RootlineUtility(42, '47-11', $context);
339  $subjectMethodReflection = (new \ReflectionMethod($subject, 'getCacheIdentifier'));
340  self::assertSame('42_47-11_8_15_0_1', $subjectMethodReflection->invoke($subject));
341  self::assertTrue($cacheFrontend->isValidEntryIdentifier($subjectMethodReflection->invoke($subject)));
342  $context->setAspect('workspace', new ‪WorkspaceAspect(0));
343  $subject = new ‪RootlineUtility(42, '47-11', $context);
344  $subjectMethodReflection = (new \ReflectionMethod($subject, 'getCacheIdentifier'));
345  self::assertSame('42_47-11_8_0_0_1', $subjectMethodReflection->invoke($subject));
346  self::assertTrue($cacheFrontend->isValidEntryIdentifier($subjectMethodReflection->invoke($subject)));
347  }
348 
349  #[Test]
351  {
352  $this->expectException(\LogicException::class);
353  $this->expectExceptionCode(1712572738);
354  unset(‪$GLOBALS['TCA']['pages']['columns']);
355  (new ‪RootlineUtility(1))->get();
356  }
357 
358  #[Test]
360  {
361  $this->expectException(\LogicException::class);
362  $this->expectExceptionCode(1712572738);
363  ‪$GLOBALS['TCA']['pages']['columns'] = 'This is not an array.';
364  (new ‪RootlineUtility(1))->get();
365  }
366 
367  #[Test]
369  {
370  $rootPageUid = 1;
371  $result = (new ‪RootlineUtility($rootPageUid))->get();
372  self::assertCount(1, $result);
373  self::assertSame($rootPageUid, (int)$result[0]['uid']);
374  }
375 
376  #[Test]
378  {
379  $this->expectException(PageNotFoundException::class);
380  $this->expectExceptionCode(1343464101);
381  $context = new ‪Context();
382  $context->setAspect('workspace', new ‪WorkspaceAspect(1));
383  (new ‪RootlineUtility(1002, '', $context))->get();
384  }
385 
386  public static function ‪getResolvesCorrectlyDataProvider(): \Generator
387  {
388  yield 'standard nested page lang default' => [
389  'uid' => 1001,
390  'language' => 0,
391  'workspace' => 0,
392  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title'],
393  'expected' => [
394  2 => [
395  'uid' => 1001,
396  'pid' => 1000,
397  't3ver_oid' => 0,
398  't3ver_wsid' => 0,
399  't3ver_state' => 0,
400  'title' => 'EN Parent 1000 Sub 1',
401  ],
402  1 => [
403  'uid' => 1000,
404  'pid' => 1,
405  't3ver_oid' => 0,
406  't3ver_wsid' => 0,
407  't3ver_state' => 0,
408  'title' => 'EN Parent 1000',
409  ],
410  0 => [
411  'uid' => 1,
412  'pid' => 0,
413  't3ver_oid' => 0,
414  't3ver_wsid' => 0,
415  't3ver_state' => 0,
416  'title' => 'EN Root',
417  ],
418  ],
419  ];
420  yield 'standard nested page lang FR, requesting with default lang id' => [
421  'uid' => 1001,
422  'language' => 1,
423  'workspace' => 0,
424  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title', '_LOCALIZED_UID', '_REQUESTED_OVERLAY_LANGUAGE'],
425  'expected' => [
426  2 => [
427  'uid' => 1001,
428  'pid' => 1000,
429  't3ver_oid' => 0,
430  't3ver_wsid' => 0,
431  't3ver_state' => 0,
432  'title' => 'FR Parent 1000 Sub 1',
433  '_LOCALIZED_UID' => 1002,
434  '_REQUESTED_OVERLAY_LANGUAGE' => 1,
435  ],
436  1 => [
437  'uid' => 1000,
438  'pid' => 1,
439  't3ver_oid' => 0,
440  't3ver_wsid' => 0,
441  't3ver_state' => 0,
442  'title' => 'EN Parent 1000',
443  ],
444  0 => [
445  'uid' => 1,
446  'pid' => 0,
447  't3ver_oid' => 0,
448  't3ver_wsid' => 0,
449  't3ver_state' => 0,
450  'title' => 'EN Root',
451  ],
452  ],
453  ];
454  // @todo: Inconsistent. Compare with above set: When requesting a localized uid directly, 'uid' is the
455  // localized one, and '_LOCALIZED_UID' and '_REQUESTED_OVERLAY_LANGUAGE' are not set at all.
456  yield 'standard nested page lang FR, requesting with FR lang id' => [
457  'uid' => 1002,
458  'language' => 1,
459  'workspace' => 0,
460  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title', '_LOCALIZED_UID', '_REQUESTED_OVERLAY_LANGUAGE'],
461  'expected' => [
462  2 => [
463  'uid' => 1002,
464  'pid' => 1000,
465  't3ver_oid' => 0,
466  't3ver_wsid' => 0,
467  't3ver_state' => 0,
468  'title' => 'FR Parent 1000 Sub 1',
469  ],
470  1 => [
471  'uid' => 1000,
472  'pid' => 1,
473  't3ver_oid' => 0,
474  't3ver_wsid' => 0,
475  't3ver_state' => 0,
476  'title' => 'EN Parent 1000',
477  ],
478  0 => [
479  'uid' => 1,
480  'pid' => 0,
481  't3ver_oid' => 0,
482  't3ver_wsid' => 0,
483  't3ver_state' => 0,
484  'title' => 'EN Root',
485  ],
486  ],
487  ];
488  yield 'new page in workspaces' => [
489  'uid' => 1011,
490  'language' => 0,
491  'workspace' => 2,
492  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title'],
493  'expected' => [
494  2 => [
495  'uid' => 1011,
496  'pid' => 1010,
497  't3ver_oid' => 0,
498  't3ver_wsid' => 2,
499  't3ver_state' => 1,
500  'title' => 'EN WS2-new Parent 1010 Sub 1',
501  ],
502  1 => [
503  'uid' => 1010,
504  'pid' => 1,
505  't3ver_oid' => 0,
506  't3ver_wsid' => 0,
507  't3ver_state' => 0,
508  'title' => 'EN Parent 1010',
509  ],
510  0 => [
511  'uid' => 1,
512  'pid' => 0,
513  't3ver_oid' => 0,
514  't3ver_wsid' => 0,
515  't3ver_state' => 0,
516  'title' => 'EN Root',
517  ],
518  ],
519  ];
520  yield 'moved in workspaces, requesting with live id in live' => [
521  'uid' => 1020,
522  'language' => 0,
523  'workspace' => 0,
524  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title'],
525  'expected' => [
526  1 => [
527  'uid' => 1020,
528  'pid' => 1,
529  't3ver_oid' => 0,
530  't3ver_wsid' => 0,
531  't3ver_state' => 0,
532  'title' => 'EN To Move in WS',
533  ],
534  0 => [
535  'uid' => 1,
536  'pid' => 0,
537  't3ver_oid' => 0,
538  't3ver_wsid' => 0,
539  't3ver_state' => 0,
540  'title' => 'EN Root',
541  ],
542  ],
543  ];
544  yield 'moved in workspaces, requesting with live id in workspace' => [
545  'uid' => 1020,
546  'language' => 0,
547  'workspace' => 2,
548  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title', '_ORIG_uid', '_ORIG_pid'],
549  'expected' => [
550  2 => [
551  'uid' => 1020,
552  'pid' => 1021,
553  't3ver_oid' => 1020,
554  't3ver_wsid' => 2,
555  't3ver_state' => 4,
556  'title' => 'EN WS2-moved Move in WS',
557  '_ORIG_uid' => 1022,
558  '_ORIG_pid' => 1,
559  ],
560  1 => [
561  'uid' => 1021,
562  'pid' => 1,
563  't3ver_oid' => 0,
564  't3ver_wsid' => 0,
565  't3ver_state' => 0,
566  'title' => 'EN Move target',
567  ],
568  0 => [
569  'uid' => 1,
570  'pid' => 0,
571  't3ver_oid' => 0,
572  't3ver_wsid' => 0,
573  't3ver_state' => 0,
574  'title' => 'EN Root',
575  ],
576  ],
577  ];
578  yield 'moved in workspaces, requesting with workspace id in workspace' => [
579  'uid' => 1022,
580  'language' => 0,
581  'workspace' => 2,
582  'testFields' => ['uid', 'pid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title', '_ORIG_uid', '_ORIG_pid'],
583  'expected' => [
584  2 => [
585  'uid' => 1020,
586  'pid' => 1021,
587  't3ver_oid' => 1020,
588  't3ver_wsid' => 2,
589  't3ver_state' => 4,
590  'title' => 'EN WS2-moved Move in WS',
591  '_ORIG_uid' => 1022,
592  '_ORIG_pid' => 1,
593  ],
594  1 => [
595  'uid' => 1021,
596  'pid' => 1,
597  't3ver_oid' => 0,
598  't3ver_wsid' => 0,
599  't3ver_state' => 0,
600  'title' => 'EN Move target',
601  ],
602  0 => [
603  'uid' => 1,
604  'pid' => 0,
605  't3ver_oid' => 0,
606  't3ver_wsid' => 0,
607  't3ver_state' => 0,
608  'title' => 'EN Root',
609  ],
610  ],
611  ];
612 
613  yield 'media lang default' => [
614  'uid' => 2001,
615  'language' => 0,
616  'workspace' => 0,
617  'testFields' => ['uid', 'title', 'media'],
618  'expected' => [
619  2 => [
620  'uid' => 2001,
621  'title' => 'EN Parent 2000 Sub 1',
622  'media' => '1001,1000',
623  ],
624  1 => [
625  'uid' => 2000,
626  'title' => 'EN Parent 2000',
627  'media' => '',
628  ],
629  0 => [
630  'uid' => 1,
631  'title' => 'EN Root',
632  'media' => '',
633  ],
634  ],
635  ];
636  yield 'media lang FR, requesting with default lang uid' => [
637  'uid' => 2001,
638  'language' => 1,
639  'workspace' => 0,
640  'testFields' => ['uid', 'title', 'media'],
641  'expected' => [
642  2 => [
643  'uid' => 2001,
644  'title' => 'FR Parent 2000 Sub 1',
645  'media' => '1010,1011',
646  ],
647  1 => [
648  'uid' => 2000,
649  'title' => 'EN Parent 2000',
650  'media' => '',
651  ],
652  0 => [
653  'uid' => 1,
654  'title' => 'EN Root',
655  'media' => '',
656  ],
657  ],
658  ];
659  yield 'media lang FR, requesting with FR lang uid' => [
660  'uid' => 2002,
661  'language' => 1,
662  'workspace' => 0,
663  'testFields' => ['uid', 'title', 'media'],
664  'expected' => [
665  2 => [
666  'uid' => 2002,
667  'title' => 'FR Parent 2000 Sub 1',
668  'media' => '1010,1011',
669  ],
670  1 => [
671  'uid' => 2000,
672  'title' => 'EN Parent 2000',
673  'media' => '',
674  ],
675  0 => [
676  'uid' => 1,
677  'title' => 'EN Root',
678  'media' => '',
679  ],
680  ],
681  ];
682  yield 'media lang default, workspace new' => [
683  'uid' => 2011,
684  'language' => 0,
685  'workspace' => 2,
686  'testFields' => ['uid', 'title', 'media'],
687  'expected' => [
688  2 => [
689  'uid' => 2011,
690  'title' => 'EN WS2-new Parent 2010 Sub 1 with media',
691  'media' => '1101,1100',
692  ],
693  1 => [
694  'uid' => 2010,
695  'title' => 'EN Parent 2010',
696  'media' => '',
697  ],
698  0 => [
699  'uid' => 1,
700  'title' => 'EN Root',
701  'media' => '',
702  ],
703  ],
704  ];
705  yield 'media lang FR, workspace new, requesting with default lang uid' => [
706  'uid' => 2021,
707  'language' => 1,
708  'workspace' => 2,
709  'testFields' => ['uid', 'title', 'media'],
710  'expected' => [
711  2 => [
712  'uid' => 2021,
713  'title' => 'FR WS2-new Parent 2020 Sub 1 with media',
714  'media' => '1201,1200',
715  ],
716  1 => [
717  'uid' => 2020,
718  'title' => 'EN Parent 2020',
719  'media' => '',
720  ],
721  0 => [
722  'uid' => 1,
723  'title' => 'EN Root',
724  'media' => '',
725  ],
726  ],
727  ];
728  yield 'media lang FR, workspace new, requesting with FR lang uid' => [
729  'uid' => 2022,
730  'language' => 1,
731  'workspace' => 2,
732  'testFields' => ['uid', 'title', 'media'],
733  'expected' => [
734  2 => [
735  'uid' => 2022,
736  'title' => 'FR WS2-new Parent 2020 Sub 1 with media',
737  'media' => '1201,1200',
738  ],
739  1 => [
740  'uid' => 2020,
741  'title' => 'EN Parent 2020',
742  'media' => '',
743  ],
744  0 => [
745  'uid' => 1,
746  'title' => 'EN Root',
747  'media' => '',
748  ],
749  ],
750  ];
751  yield 'media lang default, workspace media elements changed, requesting with live uid' => [
752  'uid' => 2031,
753  'language' => 0,
754  'workspace' => 2,
755  'testFields' => ['uid', 'title', 'media'],
756  'expected' => [
757  2 => [
758  'uid' => 2031,
759  'title' => 'EN WS2-changed Parent 2030 Sub 1 with media changed',
760  // It would be better if these would be the ws-overlay uids directly.
761  'media' => '1300,1301,1307,1303', // bug: 1303 is hidden=1 in ws and should not be there
762  ],
763  1 => [
764  'uid' => 2030,
765  'title' => 'EN Parent 2030',
766  'media' => '',
767  ],
768  0 => [
769  'uid' => 1,
770  'title' => 'EN Root',
771  'media' => '',
772  ],
773  ],
774  ];
775  yield 'media lang default, workspace media elements changed, requesting with workspace uid' => [
776  'uid' => 2032,
777  'language' => 0,
778  'workspace' => 2,
779  'testFields' => ['uid', 'title', 'media'],
780  'expected' => [
781  2 => [
782  'uid' => 2032,
783  'title' => 'EN WS2-changed Parent 2030 Sub 1 with media changed',
784  // It would be better if these would be the ws-overlay uids directly.
785  'media' => '1300,1301,1307,1303', // bug: 1303 is hidden=1 in ws and should not be there
786  ],
787  1 => [
788  'uid' => 2030,
789  'title' => 'EN Parent 2030',
790  'media' => '',
791  ],
792  0 => [
793  'uid' => 1,
794  'title' => 'EN Root',
795  'media' => '',
796  ],
797  ],
798  ];
799  yield 'media lang FR, workspace media elements changed, requesting with live uid and default lang' => [
800  'uid' => 2041,
801  'language' => 1,
802  'workspace' => 2,
803  'testFields' => ['uid', 'title', 'media'],
804  'expected' => [
805  2 => [
806  'uid' => 2041,
807  'title' => 'FR WS2-changed Parent 2040 Sub 1 with media changed',
808  // It would be better if these would be the ws-overlay uids directly.
809  'media' => '1400,1407,1401,1403', // bug: 1403 is hidden
810  ],
811  1 => [
812  'uid' => 2040,
813  'title' => 'EN Parent 2040',
814  'media' => '',
815  ],
816  0 => [
817  'uid' => 1,
818  'title' => 'EN Root',
819  'media' => '',
820  ],
821  ],
822  ];
823  yield 'media lang FR, workspace media elements changed, requesting with live uid and FR lang' => [
824  'uid' => 2042,
825  'language' => 1,
826  'workspace' => 2,
827  'testFields' => ['uid', 'title', 'media'],
828  'expected' => [
829  2 => [
830  'uid' => 2042,
831  'title' => 'FR WS2-changed Parent 2040 Sub 1 with media changed',
832  // It would be better if these would be the ws-overlay uids directly.
833  'media' => '1400,1407,1401,1403', // bug: 1403 is hidden
834  ],
835  1 => [
836  'uid' => 2040,
837  'title' => 'EN Parent 2040',
838  'media' => '',
839  ],
840  0 => [
841  'uid' => 1,
842  'title' => 'EN Root',
843  'media' => '',
844  ],
845  ],
846  ];
847  yield 'media lang FR, workspace media elements changed, requesting with workspace uid' => [
848  'uid' => 2043,
849  'language' => 1,
850  'workspace' => 2,
851  'testFields' => ['uid', 'title', 'media'],
852  'expected' => [
853  2 => [
854  'uid' => 2043,
855  'title' => 'FR WS2-changed Parent 2040 Sub 1 with media changed',
856  // It would be better if these would be the ws-overlay uids directly.
857  'media' => '1400,1407,1401,1403', // bug: 1403 is hidden
858  ],
859  1 => [
860  'uid' => 2040,
861  'title' => 'EN Parent 2040',
862  'media' => '',
863  ],
864  0 => [
865  'uid' => 1,
866  'title' => 'EN Root',
867  'media' => '',
868  ],
869  ],
870  ];
871 
872  yield 'categories lang default' => [
873  'uid' => 3010,
874  'language' => 0,
875  'workspace' => 0,
876  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
877  'expected' => [
878  2 => [
879  'uid' => 3010,
880  'title' => 'EN Parent 3000 Sub 10',
881  // bugs: deleted, hidden, starttime, endtime ignored
882  'categories' => '30,10,40,50,60,70,80,90,100,110,120,130',
883  'categories_other' => '20,30',
884  ],
885  1 => [
886  'uid' => 3000,
887  'title' => 'EN Parent 3000 contains categories',
888  'categories' => '',
889  'categories_other' => '',
890  ],
891  0 => [
892  'uid' => 1,
893  'title' => 'EN Root',
894  'categories' => '',
895  'categories_other' => '',
896  ],
897  ],
898  ];
899  yield 'categories lang FR, requesting with default lang uid' => [
900  'uid' => 3020,
901  'language' => 1,
902  'workspace' => 0,
903  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
904  'expected' => [
905  2 => [
906  'uid' => 3020,
907  'title' => 'FR Parent 3000 Sub 20',
908  // bugs: deleted, hidden, starttime, endtime ignored
909  'categories' => '30,20,40,50,60,70,80,90,100,110,120,130',
910  'categories_other' => '10,20',
911  ],
912  1 => [
913  'uid' => 3000,
914  'title' => 'FR Parent 3000 contains categories',
915  'categories' => '',
916  'categories_other' => '',
917  ],
918  0 => [
919  'uid' => 1,
920  'title' => 'EN Root',
921  'categories' => '',
922  'categories_other' => '',
923  ],
924  ],
925  ];
926  yield 'categories lang FR, requesting with FR lang uid' => [
927  'uid' => 3021,
928  'language' => 1,
929  'workspace' => 0,
930  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
931  'expected' => [
932  2 => [
933  'uid' => 3021,
934  'title' => 'FR Parent 3000 Sub 20',
935  // bugs: deleted, hidden, starttime, endtime ignored
936  'categories' => '30,20,40,50,60,70,80,90,100,110,120,130',
937  'categories_other' => '10,20',
938  ],
939  1 => [
940  'uid' => 3000,
941  'title' => 'FR Parent 3000 contains categories',
942  'categories' => '',
943  'categories_other' => '',
944  ],
945  0 => [
946  'uid' => 1,
947  'title' => 'EN Root',
948  'categories' => '',
949  'categories_other' => '',
950  ],
951  ],
952  ];
953  yield 'categories lang default, workspace new' => [
954  'uid' => 3030,
955  'language' => 0,
956  'workspace' => 2,
957  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
958  'expected' => [
959  2 => [
960  'uid' => 3030,
961  'title' => 'EN WS2-new Parent 3000 Sub 30',
962  'categories' => '30,10,40,50,60,70,80,90,100,110,120,130,140',
963  'categories_other' => '20,30',
964  ],
965  1 => [
966  'uid' => 3000,
967  'title' => 'EN Parent 3000 contains categories',
968  'categories' => '',
969  'categories_other' => '',
970  ],
971  0 => [
972  'uid' => 1,
973  'title' => 'EN Root',
974  'categories' => '',
975  'categories_other' => '',
976  ],
977  ],
978  ];
979  yield 'categories lang FR, workspace new, requesting with default lang uid' => [
980  'uid' => 3040,
981  'language' => 1,
982  'workspace' => 2,
983  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
984  'expected' => [
985  2 => [
986  'uid' => 3040,
987  'title' => 'FR WS2-new Parent 3000 Sub 40',
988  'categories' => '30,10,40,50,60,70,80,90,100,110,120,130,140',
989  'categories_other' => '20,30',
990  ],
991  1 => [
992  'uid' => 3000,
993  'title' => 'FR Parent 3000 contains categories',
994  'categories' => '',
995  'categories_other' => '',
996  ],
997  0 => [
998  'uid' => 1,
999  'title' => 'EN Root',
1000  'categories' => '',
1001  'categories_other' => '',
1002  ],
1003  ],
1004  ];
1005  yield 'categories lang FR, workspace new, requesting with FR lang uid' => [
1006  'uid' => 3041,
1007  'language' => 1,
1008  'workspace' => 2,
1009  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
1010  'expected' => [
1011  2 => [
1012  'uid' => 3041,
1013  'title' => 'FR WS2-new Parent 3000 Sub 40',
1014  'categories' => '30,10,40,50,60,70,80,90,100,110,120,130,140',
1015  'categories_other' => '20,30',
1016  ],
1017  1 => [
1018  'uid' => 3000,
1019  'title' => 'FR Parent 3000 contains categories',
1020  'categories' => '',
1021  'categories_other' => '',
1022  ],
1023  0 => [
1024  'uid' => 1,
1025  'title' => 'EN Root',
1026  'categories' => '',
1027  'categories_other' => '',
1028  ],
1029  ],
1030  ];
1031  yield 'categories lang default, workspace categories changed, requesting with live uid' => [
1032  'uid' => 3050,
1033  'language' => 0,
1034  'workspace' => 2,
1035  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
1036  'expected' => [
1037  2 => [
1038  'uid' => 3050,
1039  'title' => 'EN WS2-changed Parent 3000 Sub 50',
1040  // @todo: 10 is kept but not connected in WS
1041  // 140 not found, 20 not found
1042  // @todo missing cases: - a category has a delete placeholder in ws
1043  // - a category is changed (eg. title) in ws
1044  // - a category is unhidden, starttime, endtime enabled in ws, while it is not in live
1045  // - this test case for FR, as with 'media lang FR, workspace media elements changed'
1046  'categories' => '30,10,40,50,60,70,80,90,100,110,120,130',
1047  'categories_other' => '20,30',
1048  ],
1049  1 => [
1050  'uid' => 3000,
1051  'title' => 'EN Parent 3000 contains categories',
1052  'categories' => '',
1053  'categories_other' => '',
1054  ],
1055  0 => [
1056  'uid' => 1,
1057  'title' => 'EN Root',
1058  'categories' => '',
1059  'categories_other' => '',
1060  ],
1061  ],
1062  ];
1063  yield 'categories lang default, workspace categories changed, requesting with workspace uid' => [
1064  'uid' => 3051,
1065  'language' => 0,
1066  'workspace' => 2,
1067  'testFields' => ['uid', 'title', 'categories', 'categories_other'],
1068  'expected' => [
1069  2 => [
1070  'uid' => 3051,
1071  'title' => 'EN WS2-changed Parent 3000 Sub 50',
1072  'categories' => '30,40,50,60,70,80,90,100,110,120,130,140,20',
1073  'categories_other' => '20',
1074  ],
1075  1 => [
1076  'uid' => 3000,
1077  'title' => 'EN Parent 3000 contains categories',
1078  'categories' => '',
1079  'categories_other' => '',
1080  ],
1081  0 => [
1082  'uid' => 1,
1083  'title' => 'EN Root',
1084  'categories' => '',
1085  'categories_other' => '',
1086  ],
1087  ],
1088  ];
1089 
1090  yield 'hotel lang default' => [
1091  'uid' => 4010,
1092  'language' => 0,
1093  'workspace' => 0,
1094  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1095  'expected' => [
1096  2 => [
1097  'uid' => 4010,
1098  'title' => 'EN Parent 4000 Sub 10',
1099  // starttime / endtime not respected
1100  'tx_testrootlineutility_hotels' => '1001,1000,1004,1005',
1101  ],
1102  1 => [
1103  'uid' => 4000,
1104  'title' => 'EN Parent 4000',
1105  'tx_testrootlineutility_hotels' => '',
1106  ],
1107  0 => [
1108  'uid' => 1,
1109  'title' => 'EN Root',
1110  'tx_testrootlineutility_hotels' => '',
1111  ],
1112  ],
1113  ];
1114  yield 'hotel lang FR, requesting with default lang uid' => [
1115  'uid' => 4020,
1116  'language' => 1,
1117  'workspace' => 0,
1118  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1119  'expected' => [
1120  2 => [
1121  'uid' => 4020,
1122  'title' => 'FR Parent 4000 Sub 20',
1123  // starttime / endtime not respected
1124  'tx_testrootlineutility_hotels' => '1101,1103,1112,1114,1116,1118,1120,1122,1124,1125',
1125  ],
1126  1 => [
1127  'uid' => 4000,
1128  'title' => 'EN Parent 4000',
1129  'tx_testrootlineutility_hotels' => '',
1130  ],
1131  0 => [
1132  'uid' => 1,
1133  'title' => 'EN Root',
1134  'tx_testrootlineutility_hotels' => '',
1135  ],
1136  ],
1137  ];
1138  yield 'hotel lang FR, requesting with FR lang uid' => [
1139  'uid' => 4021,
1140  'language' => 1,
1141  'workspace' => 0,
1142  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1143  'expected' => [
1144  2 => [
1145  'uid' => 4021,
1146  'title' => 'FR Parent 4000 Sub 20',
1147  // starttime / endtime not respected
1148  'tx_testrootlineutility_hotels' => '1101,1103,1112,1114,1116,1118,1120,1122,1124,1125',
1149  ],
1150  1 => [
1151  'uid' => 4000,
1152  'title' => 'EN Parent 4000',
1153  'tx_testrootlineutility_hotels' => '',
1154  ],
1155  0 => [
1156  'uid' => 1,
1157  'title' => 'EN Root',
1158  'tx_testrootlineutility_hotels' => '',
1159  ],
1160  ],
1161  ];
1162  yield 'hotel lang default, workspace new' => [
1163  'uid' => 4030,
1164  'language' => 0,
1165  'workspace' => 2,
1166  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1167  'expected' => [
1168  2 => [
1169  'uid' => 4030,
1170  'title' => 'EN WS2-new Parent 4000 Sub 30',
1171  'tx_testrootlineutility_hotels' => '1201,1200,1204,1205',
1172  ],
1173  1 => [
1174  'uid' => 4000,
1175  'title' => 'EN Parent 4000',
1176  'tx_testrootlineutility_hotels' => '',
1177  ],
1178  0 => [
1179  'uid' => 1,
1180  'title' => 'EN Root',
1181  'tx_testrootlineutility_hotels' => '',
1182  ],
1183  ],
1184  ];
1185  yield 'hotel lang FR, workspace new, requesting with default lang uid' => [
1186  'uid' => 4040,
1187  'language' => 1,
1188  'workspace' => 2,
1189  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1190  'expected' => [
1191  2 => [
1192  'uid' => 4040,
1193  'title' => 'FR WS2-new Parent 4000 Sub 40',
1194  'tx_testrootlineutility_hotels' => '1301,1303,1312,1314,1316,1318,1320,1322,1324,1325',
1195  ],
1196  1 => [
1197  'uid' => 4000,
1198  'title' => 'EN Parent 4000',
1199  'tx_testrootlineutility_hotels' => '',
1200  ],
1201  0 => [
1202  'uid' => 1,
1203  'title' => 'EN Root',
1204  'tx_testrootlineutility_hotels' => '',
1205  ],
1206  ],
1207  ];
1208  yield 'hotel lang FR, workspace new, requesting with FR lang uid' => [
1209  'uid' => 4041,
1210  'language' => 1,
1211  'workspace' => 2,
1212  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1213  'expected' => [
1214  2 => [
1215  'uid' => 4041,
1216  'title' => 'FR WS2-new Parent 4000 Sub 40',
1217  'tx_testrootlineutility_hotels' => '1301,1303,1312,1314,1316,1318,1320,1322,1324,1325',
1218  ],
1219  1 => [
1220  'uid' => 4000,
1221  'title' => 'EN Parent 4000',
1222  'tx_testrootlineutility_hotels' => '',
1223  ],
1224  0 => [
1225  'uid' => 1,
1226  'title' => 'EN Root',
1227  'tx_testrootlineutility_hotels' => '',
1228  ],
1229  ],
1230  ];
1231  yield 'hotel lang default, workspace hotels changed, requesting with live uid' => [
1232  'uid' => 4050,
1233  'language' => 0,
1234  'workspace' => 2,
1235  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1236  'expected' => [
1237  2 => [
1238  'uid' => 4050,
1239  'title' => 'EN WS2-changed Parent 4000 Sub 50',
1240  // hidden, starttime, endtime bugs ...
1241  'tx_testrootlineutility_hotels' => '1400,1402,1404,1409,1413,1415,1417,1419,1421,1423',
1242  ],
1243  1 => [
1244  'uid' => 4000,
1245  'title' => 'EN Parent 4000',
1246  'tx_testrootlineutility_hotels' => '',
1247  ],
1248  0 => [
1249  'uid' => 1,
1250  'title' => 'EN Root',
1251  'tx_testrootlineutility_hotels' => '',
1252  ],
1253  ],
1254  ];
1255  yield 'hotel lang default, workspace hotels changed, requesting with workspace uid' => [
1256  'uid' => 4051,
1257  'language' => 0,
1258  'workspace' => 2,
1259  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1260  'expected' => [
1261  2 => [
1262  'uid' => 4051,
1263  'title' => 'EN WS2-changed Parent 4000 Sub 50',
1264  // hidden, starttime, endtime bugs ...
1265  'tx_testrootlineutility_hotels' => '1400,1402,1404,1409,1413,1415,1417,1419,1421,1423',
1266  ],
1267  1 => [
1268  'uid' => 4000,
1269  'title' => 'EN Parent 4000',
1270  'tx_testrootlineutility_hotels' => '',
1271  ],
1272  0 => [
1273  'uid' => 1,
1274  'title' => 'EN Root',
1275  'tx_testrootlineutility_hotels' => '',
1276  ],
1277  ],
1278  ];
1279  yield 'hotel lang FR, workspace hotels changed, requesting with live uid and default lang' => [
1280  'uid' => 4060,
1281  'language' => 1,
1282  'workspace' => 2,
1283  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1284  'expected' => [
1285  2 => [
1286  'uid' => 4060,
1287  'title' => 'FR WS2-changed Parent 4000 Sub 60',
1288  // hidden, starttime, endtime bugs ...
1289  'tx_testrootlineutility_hotels' => '1501,1503,1505,1510,1514,1516,1518,1520,1522,1524',
1290  ],
1291  1 => [
1292  'uid' => 4000,
1293  'title' => 'EN Parent 4000',
1294  'tx_testrootlineutility_hotels' => '',
1295  ],
1296  0 => [
1297  'uid' => 1,
1298  'title' => 'EN Root',
1299  'tx_testrootlineutility_hotels' => '',
1300  ],
1301  ],
1302  ];
1303  yield 'hotel lang FR, workspace hotels changed, requesting with live uid and FR lang' => [
1304  'uid' => 4061,
1305  'language' => 1,
1306  'workspace' => 2,
1307  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1308  'expected' => [
1309  2 => [
1310  'uid' => 4061,
1311  'title' => 'FR WS2-changed Parent 4000 Sub 60',
1312  // hidden, starttime, endtime bugs ...
1313  'tx_testrootlineutility_hotels' => '1501,1503,1505,1510,1514,1516,1518,1520,1522,1524',
1314  ],
1315  1 => [
1316  'uid' => 4000,
1317  'title' => 'EN Parent 4000',
1318  'tx_testrootlineutility_hotels' => '',
1319  ],
1320  0 => [
1321  'uid' => 1,
1322  'title' => 'EN Root',
1323  'tx_testrootlineutility_hotels' => '',
1324  ],
1325  ],
1326  ];
1327  yield 'hotel lang FR, workspace hotels changed, requesting with workspace uid' => [
1328  'uid' => 4062,
1329  'language' => 1,
1330  'workspace' => 2,
1331  'testFields' => ['uid', 'title', 'tx_testrootlineutility_hotels'],
1332  'expected' => [
1333  2 => [
1334  'uid' => 4062,
1335  'title' => 'FR WS2-changed Parent 4000 Sub 60',
1336  // hidden, starttime, endtime bugs ...
1337  'tx_testrootlineutility_hotels' => '1501,1503,1505,1510,1514,1516,1518,1520,1522,1524',
1338  ],
1339  1 => [
1340  'uid' => 4000,
1341  'title' => 'EN Parent 4000',
1342  'tx_testrootlineutility_hotels' => '',
1343  ],
1344  0 => [
1345  'uid' => 1,
1346  'title' => 'EN Root',
1347  'tx_testrootlineutility_hotels' => '',
1348  ],
1349  ],
1350  ];
1351  }
1352 
1353  #[DataProvider('getResolvesCorrectlyDataProvider')]
1354  #[Test]
1355  public function ‪getResolvesCorrectly(int ‪$uid, int $language, int $workspace, array $testFields, array $expected): void
1356  {
1357  $context = new ‪Context();
1358  $context->setAspect('workspace', new ‪WorkspaceAspect($workspace));
1359  $context->setAspect('language', new ‪LanguageAspect($language));
1360  $result = (new ‪RootlineUtility(‪$uid, '', $context))->get();
1361  self::assertSame($expected, $this->‪filterExpectedValues($result, $testFields));
1362  }
1363 }
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageWithMountedPageAddsMountPointParameterToReturnValue
‪processMountedPageWithMountedPageAddsMountPointParameterToReturnValue()
Definition: RootlineUtilityTest.php:152
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsGroupFieldAsLocal
‪columnHasRelationToResolveDetectsGroupFieldAsLocal()
Definition: RootlineUtilityTest.php:221
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsInlineFieldAsLocal
‪columnHasRelationToResolveDetectsInlineFieldAsLocal()
Definition: RootlineUtilityTest.php:252
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:108
‪TYPO3\CMS\Core\Context\VisibilityAspect
Definition: VisibilityAspect.php:31
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsGroupFieldWithMMAsRemote
‪columnHasRelationToResolveDetectsGroupFieldWithMMAsRemote()
Definition: RootlineUtilityTest.php:236
‪TYPO3\CMS\Core\Context\WorkspaceAspect
Definition: WorkspaceAspect.php:31
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageWithMountedPageAddsMountedFromParameter
‪processMountedPageWithMountedPageAddsMountedFromParameter()
Definition: RootlineUtilityTest.php:138
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsInlineFieldWithFMMAsRemote
‪columnHasRelationToResolveDetectsInlineFieldWithFMMAsRemote()
Definition: RootlineUtilityTest.php:283
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_DEFAULT
‪const DOKTYPE_DEFAULT
Definition: PageRepository.php:98
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest
Definition: RootlineUtilityTest.php:35
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\LANGUAGE_PRESETS
‪const LANGUAGE_PRESETS
Definition: RootlineUtilityTest.php:37
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait
Definition: SiteBasedTestTrait.php:37
‪TYPO3\CMS\Core\Database\ReferenceIndex
Definition: ReferenceIndex.php:40
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsInlineFieldWithForeignKeyAsRemote
‪columnHasRelationToResolveDetectsInlineFieldWithForeignKeyAsRemote()
Definition: RootlineUtilityTest.php:267
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\$configurationToUseInTestInstance
‪array $configurationToUseInTestInstance
Definition: RootlineUtilityTest.php:46
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\writeSiteConfiguration
‪writeSiteConfiguration(string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
Definition: SiteBasedTestTrait.php:50
‪TYPO3\CMS\Core\Utility\RootlineUtility
Definition: RootlineUtility.php:40
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\rootlineFailsForDeletedParentPageInWorkspace
‪rootlineFailsForDeletedParentPageInWorkspace()
Definition: RootlineUtilityTest.php:376
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\verifyCleanReferenceIndex
‪verifyCleanReferenceIndex()
Definition: RootlineUtilityTest.php:82
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:88
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: RootlineUtilityTest.php:43
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageWithNonMountedPageThrowsException
‪processMountedPageWithNonMountedPageThrowsException()
Definition: RootlineUtilityTest.php:115
‪TYPO3\CMS\Core\Cache\Frontend\NullFrontend
Definition: NullFrontend.php:30
‪$fields
‪$fields
Definition: pages.php:5
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageWithMountedPageNotThrowsException
‪processMountedPageWithMountedPageNotThrowsException()
Definition: RootlineUtilityTest.php:125
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getResolvesCorrectly
‪getResolvesCorrectly(int $uid, int $language, int $workspace, array $testFields, array $expected)
Definition: RootlineUtilityTest.php:1354
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\isMountedPageWithNonMatchingMountPointParameterReturnsFalse
‪isMountedPageWithNonMatchingMountPointParameterReturnsFalse()
Definition: RootlineUtilityTest.php:107
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_MOUNTPOINT
‪const DOKTYPE_MOUNTPOINT
Definition: PageRepository.php:102
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\isMountedPageWithoutMountPointsReturnsFalse
‪isMountedPageWithoutMountPointsReturnsFalse()
Definition: RootlineUtilityTest.php:91
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\$coreExtensionsToLoad
‪array $coreExtensionsToLoad
Definition: RootlineUtilityTest.php:42
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsSelectFieldWithMMAsRemote
‪columnHasRelationToResolveDetectsSelectFieldWithMMAsRemote()
Definition: RootlineUtilityTest.php:314
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getResolvesCorrectlyDataProvider
‪static getResolvesCorrectlyDataProvider()
Definition: RootlineUtilityTest.php:385
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageForMountPageIsOverlayAddsDataInformationAboutMountPage
‪processMountedPageForMountPageIsOverlayAddsDataInformationAboutMountPage()
Definition: RootlineUtilityTest.php:180
‪TYPO3\CMS\Core\Context\LanguageAspect
Definition: LanguageAspect.php:57
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\isMountedPageWithMatchingMountPointParameterReturnsTrue
‪isMountedPageWithMatchingMountPointParameterReturnsTrue()
Definition: RootlineUtilityTest.php:99
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageForMountPageIsOverlayAddsMountOLParameter
‪processMountedPageForMountPageIsOverlayAddsMountOLParameter()
Definition: RootlineUtilityTest.php:166
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getForRootPageOnlyReturnsRootPageInformation
‪getForRootPageOnlyReturnsRootPageInformation()
Definition: RootlineUtilityTest.php:367
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:98
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getCacheIdentifierContainsAllContextParameters
‪getCacheIdentifierContainsAllContextParameters()
Definition: RootlineUtilityTest.php:330
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Tests\Functional\Utility
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\setUp
‪setUp()
Definition: RootlineUtilityTest.php:52
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getWithPagesColumnsTcaNonArrayThrowsException
‪getWithPagesColumnsTcaNonArrayThrowsException()
Definition: RootlineUtilityTest.php:358
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\processMountedPageForMountPageWithoutOverlayReplacesMountedPageWithMountPage
‪processMountedPageForMountPageWithoutOverlayReplacesMountedPageWithMountPage()
Definition: RootlineUtilityTest.php:201
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\getWithMissingPagesColumnsTcaThrowsException
‪getWithMissingPagesColumnsTcaThrowsException()
Definition: RootlineUtilityTest.php:349
‪TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_OFF
‪const OVERLAYS_OFF
Definition: LanguageAspect.php:74
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:69
‪TYPO3\CMS\Core\Exception\Page\PageNotFoundException
Definition: PageNotFoundException.php:23
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\filterExpectedValues
‪filterExpectedValues(array $incomingData, array $fields)
Definition: RootlineUtilityTest.php:66
‪TYPO3\CMS\Core\Tests\Functional\Utility\RootlineUtilityTest\columnHasRelationToResolveDetectsSelectFieldAsLocal
‪columnHasRelationToResolveDetectsSelectFieldAsLocal()
Definition: RootlineUtilityTest.php:299