‪TYPO3CMS  10.4
EnhancerSiteRequestTest.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 
35 use TYPO3\TestingFramework\Core\Functional\Framework\DataHandling\Scenario\DataHandlerFactory;
36 use TYPO3\TestingFramework\Core\Functional\Framework\DataHandling\Scenario\DataHandlerWriter;
37 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
38 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequestContext;
39 
44 {
46 
50  private ‪$siteTitle = 'A Company that Manufactures Everything Inc';
51 
56 
57  public static function ‪setUpBeforeClass(): void
58  {
59  parent::setUpBeforeClass();
60  static::initializeDatabaseSnapshot();
61  }
62 
63  public static function ‪tearDownAfterClass(): void
64  {
65  static::destroyDatabaseSnapshot();
66  parent::tearDownAfterClass();
67  }
68 
69  protected function ‪setUp(): void
70  {
71  parent::setUp();
72 
73  // these settings are forwarded to the frontend sub-request as well
74  $this->internalRequestContext = (new InternalRequestContext())
75  ->withGlobalSettings(['TYPO3_CONF_VARS' => static::TYPO3_CONF_VARS]);
76 
78  'acme-com',
79  $this->‪buildSiteConfiguration(1000, 'https://acme.com/'),
80  [
81  $this->‪buildDefaultLanguageConfiguration('EN', 'https://acme.us/'),
82  $this->‪buildLanguageConfiguration('FR', 'https://acme.fr/', ['EN']),
83  $this->‪buildLanguageConfiguration('FR-CA', 'https://acme.ca/', ['FR', 'EN']),
84  ]
85  );
86 
88  'archive-acme-com',
89  $this->‪buildSiteConfiguration(3000, 'https://archive.acme.com/'),
90  [
91  $this->‪buildDefaultLanguageConfiguration('EN', '/'),
92  $this->‪buildLanguageConfiguration('FR', 'https://archive.acme.com/fr/', ['EN']),
93  $this->‪buildLanguageConfiguration('FR-CA', 'https://archive.acme.com/ca/', ['FR', 'EN'])
94  ]
95  );
96 
97  $this->withDatabaseSnapshot(function () {
98  $this->‪setUpDatabase();
99  });
100  }
101 
102  protected function ‪setUpDatabase()
103  {
104  $backendUser = $this->setUpBackendUserFromFixture(1);
106 
107  $scenarioFile = __DIR__ . '/Fixtures/SlugScenario.yaml';
108  $factory = DataHandlerFactory::fromYamlFile($scenarioFile);
109  $writer = DataHandlerWriter::withBackendUser($backendUser);
110  $writer->invokeFactory($factory);
111  static::failIfArrayIsNotEmpty(
112  $writer->getErrors()
113  );
114 
115  $this->setUpFrontendRootPage(
116  1000,
117  [
118  'typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/LinkRequest.typoscript',
119  ],
120  [
121  'title' => 'ACME Root',
122  'sitetitle' => $this->siteTitle,
123  ]
124  );
125 
126  $this->setUpFrontendRootPage(
127  3000,
128  [
129  'typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/LinkRequest.typoscript',
130  ],
131  [
132  'title' => 'ACME Archive',
133  'sitetitle' => $this->siteTitle,
134  ]
135  );
136  }
137 
138  protected function ‪tearDown(): void
139  {
140  unset($this->internalRequestContext);
141  parent::tearDown();
142  }
143 
148  public function ‪localeModifierDataProvider($parentSet = null): array
149  {
150  $builder = ‪Builder::create();
151  // variables (applied when invoking expectations)
152  $variables = ‪Variables::create()->define([
153  'value' => 100,
154  'resolveValue' => 100,
155  'routePrefix' => '{enhance_name}',
156  'aspectName' => 'enhance_name',
157  'inArguments' => 'dynamicArguments' // either 'dynamicArguments' or 'staticArguments'
158  ]);
159  $enhancers = $builder->declareEnhancers();
160  $variableContexts = [
163  'cHash' => '46227b4ce096dc78a4e71463326c9020',
164  'cHash2' => 'f80d112e877175ce8e7d54c35bebe12c'
165  ])
166  )->withRequiredApplicables($enhancers['Simple']),
169  'cHash' => 'e24d3d2d5503baba670d827c3b9470c8',
170  'cHash2' => '54f45ea94a5e812fbae944792dac940d'
171  ])
172  )->withRequiredApplicables($enhancers['Plugin']),
175  'cHash' => 'eef21771ab3c3dac3514b4479eedd5ff',
176  'cHash2' => 'c822555d4ebd106b0d1687e43a4db9c9'
177  ])
178  )->withRequiredApplicables($enhancers['Extbase']),
179  ];
180  return ‪Permutation::create($variables)
181  ->withTargets(
182  ‪TestSet::create($parentSet)
183  ->withMergedApplicables(‪LanguageContext::create(0))
184  ->withTargetPageId(1100)
185  ->withUrl(
187  'https://acme.us/welcome/enhance/[[value]][[pathSuffix]]?cHash=[[cHash]]',
188  ‪Variables::create(['pathSuffix' => ''])
189  )
190  ),
191  ‪TestSet::create($parentSet)
192  ->withMergedApplicables(‪LanguageContext::create(1))
193  ->withTargetPageId(1100)
194  ->withUrl(
196  'https://acme.fr/bienvenue/augmenter/[[value]][[pathSuffix]]?cHash=[[cHash]]',
197  ‪Variables::create(['pathSuffix' => ''])
198  )
199  ),
200  ‪TestSet::create($parentSet)
201  ->withMergedApplicables(‪LanguageContext::create(0))
202  ->withTargetPageId(3000)
203  ->withUrl(
205  'https://archive.acme.com/enhance/[[value]][[pathSuffix]]?cHash=[[cHash2]]',
206  ‪Variables::create(['pathSuffix' => ''])
207  )
208  ),
209  ‪TestSet::create($parentSet)
210  ->withMergedApplicables(‪LanguageContext::create(1))
211  ->withTargetPageId(3000)
212  ->withUrl(
214  'https://archive.acme.com/fr/augmenter/[[value]][[pathSuffix]]?cHash=[[cHash2]]',
215  ‪Variables::create(['pathSuffix' => ''])
216  )
217  )
218  )
219  ->withApplicableItems($variableContexts)
220  ->withApplicableItems($enhancers)
221  ->withApplicableSet(
222  ‪AspectDeclaration::create('LocaleModifier')->withConfiguration([
223  ‪VariableItem::create('aspectName', [
224  'type' => 'LocaleModifier',
225  'default' => 'enhance',
226  'localeMap' => [
227  [
228  'locale' => 'fr_FR',
229  'value' => 'augmenter'
230  ]
231  ],
232  ])
233  ])
234  )
235  ->permute()
236  ->getTargetsForDataProvider();
237  }
238 
245  public function ‪localeModifierIsApplied(TestSet $testSet): void
246  {
247  $this->‪assertPageArgumentsEquals($testSet);
248  }
249 
254  public function ‪persistedAliasMapperDataProvider($parentSet = null): array
255  {
256  $builder = ‪Builder::create();
257  // variables (applied when invoking expectations)
258  $variables = ‪Variables::create()->define([
259  'value' => 1100,
260  'resolveValue' => 1100,
261  'routePrefix' => 'enhance',
262  'aspectName' => 'value',
263  'inArguments' => 'staticArguments' // either 'dynamicArguments' or 'staticArguments'
264  ]);
265  return ‪Permutation::create($variables)
266  ->withTargets(
267  ‪TestSet::create($parentSet)
268  ->withMergedApplicables(‪LanguageContext::create(0))
269  ->withTargetPageId(1100)
270  ->withUrl(
272  'https://acme.us/welcome/enhance/welcome[[pathSuffix]]',
273  ‪Variables::create(['pathSuffix' => ''])
274  )
275  ),
276  ‪TestSet::create($parentSet)
277  ->withMergedApplicables(‪LanguageContext::create(1))
278  ->withTargetPageId(1100)
279  ->withUrl(
281  'https://acme.fr/bienvenue/enhance/bienvenue[[pathSuffix]]',
282  ‪Variables::create(['pathSuffix' => ''])
283  )
284  )
285  )
286  ->withApplicableItems($builder->declareEnhancers())
287  ->withApplicableSet(
288  ‪AspectDeclaration::create('PersistedAliasMapper')->withConfiguration([
289  ‪VariableItem::create('aspectName', [
290  'type' => 'PersistedAliasMapper',
291  'tableName' => 'pages',
292  'routeFieldName' => 'slug',
293  'routeValuePrefix' => '/',
294  ])
295  ])
296  )
297  ->permute()
298  ->getTargetsForDataProvider();
299  }
300 
307  public function ‪persistedAliasMapperIsApplied(TestSet $testSet): void
308  {
309  $this->‪assertPageArgumentsEquals($testSet);
310  }
311 
316  public function ‪persistedPatternMapperDataProvider($parentSet = null): array
317  {
318  $builder = ‪Builder::create();
319  // variables (applied when invoking expectations)
320  $variables = ‪Variables::create()->define([
321  'value' => 1100,
322  'resolveValue' => 1100,
323  'routePrefix' => 'enhance',
324  'aspectName' => 'value',
325  'inArguments' => 'staticArguments' // either 'dynamicArguments' or 'staticArguments'
326  ]);
327  return ‪Permutation::create($variables)
328  ->withTargets(
329  ‪TestSet::create($parentSet)
330  ->withMergedApplicables(‪LanguageContext::create(0))
331  ->withTargetPageId(1100)
332  ->withUrl(
334  'https://acme.us/welcome/enhance/hello-and-welcome-[[value]][[pathSuffix]]',
335  ‪Variables::create(['pathSuffix' => ''])
336  )
337  ),
338  ‪TestSet::create($parentSet)
339  ->withMergedApplicables(‪LanguageContext::create(1))
340  ->withTargetPageId(1100)
341  ->withUrl(
343  'https://acme.fr/bienvenue/enhance/salut-et-bienvenue-[[value]][[pathSuffix]]',
344  ‪Variables::create(['pathSuffix' => ''])
345  )
346  )
347  )
348  ->withApplicableItems($builder->declareEnhancers())
349  ->withApplicableSet(
350  ‪AspectDeclaration::create('PersistedPatternMapper')->withConfiguration([
351  ‪VariableItem::create('aspectName', [
352  'type' => 'PersistedPatternMapper',
353  'tableName' => 'pages',
354  'routeFieldPattern' => '^(?P<subtitle>.+)-(?P<uid>\d+)$',
355  'routeFieldResult' => '{subtitle}-{uid}',
356  ])
357  ])
358  )
359  ->permute()
360  ->getTargetsForDataProvider();
361  }
362 
369  public function ‪persistedPatternMapperIsApplied(TestSet $testSet): void
370  {
371  $this->‪assertPageArgumentsEquals($testSet);
372  }
373 
378  public function ‪staticValueMapperDataProvider($parentSet = null): array
379  {
380  $builder = ‪Builder::create();
381  // variables (applied when invoking expectations)
382  $variables = ‪Variables::create()->define([
383  'value' => 100,
384  'resolveValue' => 100,
385  'routePrefix' => 'enhance',
386  'aspectName' => 'value',
387  'inArguments' => 'staticArguments' // either 'dynamicArguments' or 'staticArguments'
388  ]);
389  return ‪Permutation::create($variables)
390  ->withTargets(
391  ‪TestSet::create($parentSet)
392  ->withMergedApplicables(‪LanguageContext::create(0))
393  ->withTargetPageId(1100)
394  ->withUrl(
396  'https://acme.us/welcome/enhance/hundred[[pathSuffix]]',
397  ‪Variables::create(['pathSuffix' => ''])
398  )
399  ),
400  ‪TestSet::create($parentSet)
401  ->withMergedApplicables(‪LanguageContext::create(1))
402  ->withTargetPageId(1100)
403  ->withUrl(
405  'https://acme.fr/bienvenue/enhance/cent[[pathSuffix]]',
406  ‪Variables::create(['pathSuffix' => ''])
407  )
408  )
409  )
410  ->withApplicableItems($builder->declareEnhancers())
411  ->withApplicableSet(
412  ‪AspectDeclaration::create('StaticValueMapper')->withConfiguration([
413  ‪VariableItem::create('aspectName', [
414  'type' => 'StaticValueMapper',
415  'map' => [
416  'hundred' => 100,
417  ],
418  'localeMap' => [
419  [
420  'locale' => 'fr_FR',
421  'map' => [
422  'cent' => 100,
423  ],
424  ]
425  ],
426  ])
427  ])
428  )
429  ->permute()
430  ->getTargetsForDataProvider();
431  }
432 
439  public function ‪staticValueMapperIsApplied(TestSet $testSet): void
440  {
441  $this->‪assertPageArgumentsEquals($testSet);
442  }
443 
448  public function ‪staticRangeMapperDataProvider($parentSet = null): array
449  {
450  $variableContexts = array_map(
451  function ($value) {
454  'value' => $value,
455  'resolveValue' => $value,
456  ])
457  );
458  },
459  range(10, 100, 30)
460  );
461 
462  $builder = ‪Builder::create();
463  // variables (applied when invoking expectations)
464  $variables = ‪Variables::create()->define([
465  'routePrefix' => 'enhance',
466  'aspectName' => 'value',
467  'inArguments' => 'staticArguments' // either 'dynamicArguments' or 'staticArguments'
468  ]);
469  return ‪Permutation::create($variables)
470  ->withTargets(
471  ‪TestSet::create($parentSet)
472  ->withMergedApplicables(‪LanguageContext::create(0))
473  ->withTargetPageId(1100)
474  ->withUrl(
476  'https://acme.us/welcome/enhance/[[value]][[pathSuffix]]',
477  ‪Variables::create(['pathSuffix' => ''])
478  )
479  ),
480  ‪TestSet::create($parentSet)
481  ->withMergedApplicables(‪LanguageContext::create(1))
482  ->withTargetPageId(1100)
483  ->withUrl(
485  'https://acme.fr/bienvenue/enhance/[[value]][[pathSuffix]]',
486  ‪Variables::create(['pathSuffix' => ''])
487  )
488  )
489  )
490  ->withApplicableItems($variableContexts)
491  ->withApplicableItems($builder->declareEnhancers())
492  ->withApplicableSet(
493  ‪AspectDeclaration::create('StaticRangeMapper')->withConfiguration([
494  ‪VariableItem::create('aspectName', [
495  'type' => 'StaticRangeMapper',
496  'start' => '1',
497  'end' => '100',
498  ])
499  ])
500  )
501  ->permute()
502  ->getTargetsForDataProvider();
503  }
504 
511  public function ‪staticRangeMapperIsApplied(TestSet $testSet): void
512  {
513  $this->‪assertPageArgumentsEquals($testSet);
514  }
515 
519  public function ‪pageTypeDecoratorIsAppliedDataProvider(): array
520  {
521  $testSets = [];
522  foreach (‪Builder::create()->declarePageTypes() as $pageTypeDeclaration) {
523  $testSet = ‪TestSet::create()
524  ->withMergedApplicables($pageTypeDeclaration)
525  ->withVariables($pageTypeDeclaration->getVariables());
526 
527  $testSetWithoutEnhancers =
528  ‪TestSet::create($testSet)
529  ->withMergedApplicables(‪LanguageContext::create(0))
530  ->withTargetPageId(3000)
531  ->withUrl(
533  'https://archive.acme.com/[[index]][[pathSuffix]]',
534  ‪Variables::create(['pathSuffix' => '', 'index' => ''])
535  )
536  )
537  ;
538  $testSets = array_merge(
539  $testSets,
540  [$testSetWithoutEnhancers->describe() => [$testSetWithoutEnhancers]],
541  $this->localeModifierDataProvider($testSet),
542  $this->persistedAliasMapperDataProvider($testSet),
543  $this->persistedPatternMapperDataProvider($testSet),
544  $this->staticValueMapperDataProvider($testSet),
545  $this->staticRangeMapperDataProvider($testSet)
546  );
547  }
548  return $testSets;
549  }
550 
557  public function ‪pageTypeDecoratorIsApplied(TestSet $testSet): void
558  {
559  $builder = ‪Builder::create();
560  $enhancerConfiguration = $builder->compileEnhancerConfiguration($testSet);
561  $pageTypeConfiguration = $builder->compilePageTypeConfiguration($testSet);
562  $targetUri = $builder->compileUrl($testSet);
564  $languageContext = $testSet->getSingleApplicable(LanguageContext::class);
565  $expectedLanguageId = $languageContext->getLanguageId();
566  $expectation = $builder->compileResolveArguments($testSet);
567 
568  $overrides = [
569  'routeEnhancers' => [
570  'PageType' => $pageTypeConfiguration,
571  ]
572  ];
573  if ($enhancerConfiguration) {
574  $overrides['routeEnhancers']['Enhancer'] = $enhancerConfiguration;
575  }
576  $this->‪mergeSiteConfiguration('acme-com', $overrides);
577  $this->‪mergeSiteConfiguration('archive-acme-com', $overrides);
578 
579  $allParameters = array_replace_recursive(
580  $expectation['dynamicArguments'],
581  $expectation['staticArguments']
582  );
583  $expectation['pageId'] = $testSet->getTargetPageId();
584  $expectation['languageId'] = $expectedLanguageId;
585  $expectation['requestQueryParams'] = $allParameters;
586  $expectation['_GET'] = $allParameters;
587 
588  $response = $this->executeFrontendRequest(
589  new InternalRequest($targetUri),
590  $this->internalRequestContext,
591  true
592  );
593 
594  $pageArguments = json_decode((string)$response->getBody(), true);
595  self::assertEquals($expectation, $pageArguments);
596  }
597 
602  {
603  $testSets = [];
604  foreach (‪Builder::create()->declarePageTypes() as $pageTypeDeclaration) {
605  $testSet = ‪TestSet::create()
606  ->withMergedApplicables($pageTypeDeclaration)
607  ->withVariables($pageTypeDeclaration->getVariables());
608 
609  $testSetForPageContainingIndexInSlug =
610  ‪TestSet::create($testSet)
611  ->withMergedApplicables(‪LanguageContext::create(0))
612  ->withTargetPageId(3200)
613  ->withUrl(
615  'https://archive.acme.com/stock-index[[pathSuffix]]',
616  ‪Variables::create(['pathSuffix' => ''])
617  )
618  )
619  ;
620  $testSets = array_merge(
621  $testSets,
622  [$testSetForPageContainingIndexInSlug->describe() => [$testSetForPageContainingIndexInSlug]]
623  );
624  }
625  return $testSets;
626  }
627 
634  public function ‪pageTypeDecoratorIndexCanBePartOfSlug(TestSet $testSet): void
635  {
636  $builder = ‪Builder::create();
637  $targetUri = $builder->compileUrl($testSet);
639  $languageContext = $testSet->getSingleApplicable(LanguageContext::class);
640  $expectedLanguageId = $languageContext->getLanguageId();
641  $expectation = $builder->compileResolveArguments($testSet);
642 
643  $overrides = [
644  'routeEnhancers' => [
645  'PageType' => $builder->compilePageTypeConfiguration($testSet),
646  ]
647  ];
648  $this->‪mergeSiteConfiguration('archive-acme-com', $overrides);
649 
650  $allParameters = array_replace_recursive(
651  $expectation['dynamicArguments'],
652  $expectation['staticArguments']
653  );
654  $expectation['pageId'] = $testSet->getTargetPageId();
655  $expectation['languageId'] = $expectedLanguageId;
656  $expectation['requestQueryParams'] = $allParameters;
657  $expectation['_GET'] = $allParameters;
658 
659  $response = $this->executeFrontendRequest(
660  new InternalRequest($targetUri),
661  $this->internalRequestContext,
662  true
663  );
664 
665  $pageArguments = json_decode((string)$response->getBody(), true);
666  self::assertEquals($expectation, $pageArguments);
667  }
668 
669  public function ‪routeDefaultsAreConsideredDataProvider($parentSet = null): array
670  {
671  $builder = ‪Builder::create();
672  // variables (applied when invoking expectations)
673  $variables = ‪Variables::create()->define([
674  'uriValue' => '',
675  'resolveValue' => 100,
676  'routePrefix' => 'enhance',
677  'aspectName' => 'value',
678  'inArguments' => 'staticArguments', // either 'dynamicArguments' or 'staticArguments'
679  'otherInArguments' => null,
680  ]);
681  $enhancerDeclarations = $builder->declareEnhancers();
682  $englishLanguage = ‪LanguageContext::create(0);
683  $frenchLanguage = ‪LanguageContext::create(1);
684  $plainRouteParameter = ‪VariablesContext::create(‪Variables::create(['routeParameter' => '{value}']));
685  $enforcedRouteParameter = ‪VariablesContext::create(‪Variables::create(['routeParameter' => '{!value}']));
686  return ‪Permutation::create($variables)
687  ->withTargets(
688  ‪TestSet::create($parentSet)
689  ->withMergedApplicables($englishLanguage)
690  ->withTargetPageId(1100)
691  ->withUrl(
693  'https://acme.us/welcome/enhance[[uriValue]][[pathSuffix]]',
694  ‪Variables::create(['pathSuffix' => '', 'uriValue' => '/hundred'])
695  )
696  ),
697  ‪TestSet::create($parentSet)
698  ->withMergedApplicables($frenchLanguage)
699  ->withTargetPageId(1100)
700  ->withUrl(
702  'https://acme.fr/bienvenue/enhance[[uriValue]][[pathSuffix]]',
703  ‪Variables::create(['pathSuffix' => '', 'uriValue' => '/cent'])
704  )
705  )
706  )
707  ->withApplicableItems($builder->declareEnhancers())
708  ->withApplicableSet(
709  ‪EnhancerDeclaration::create('defaults.value=100')->withConfiguration([
710  'defaults' => [
711  'value' => 100,
712  // it's expected that `other` is NOT applied in page arguments
713  // since it is not used as `{other}` in `routePath`
714  'other' => 200,
715  ]
716  ])
717  )
718  ->withApplicableSet(
719  ‪AspectDeclaration::create('StaticValueMapper')->withConfiguration([
720  ‪VariableItem::create('aspectName', [
721  'type' => 'StaticValueMapper',
722  'map' => [
723  'hundred' => 100,
724  ],
725  'localeMap' => [
726  [
727  'locale' => 'fr_FR',
728  'map' => [
729  'cent' => 100,
730  ],
731  ]
732  ],
733  ])
734  ])
735  )
736  ->withApplicableSet($plainRouteParameter, $enforcedRouteParameter)
737  ->withApplicableSet(
738  // @todo Default route not resolved having enforced route parameter `{!value}`
740  'uriValue' => null,
741  ]))->withRequiredApplicables($plainRouteParameter),
743  'uriValue' => '/hundred',
744  ]))->withRequiredApplicables($englishLanguage),
746  'uriValue' => '/cent',
747  ]))->withRequiredApplicables($frenchLanguage)
748  )
749  ->permute()
750  ->getTargetsForDataProvider();
751  }
752 
759  public function ‪routeDefaultsAreConsidered(TestSet $testSet): void
760  {
762  }
763 
764  public function ‪routeRequirementsHavingAspectsAreConsideredDataProvider($parentSet = null): array
765  {
766  $builder = ‪Builder::create();
767  // variables (applied when invoking expectations)
768  $variables = ‪Variables::create()->define([
769  'routePrefix' => 'enhance',
770  'aspectName' => 'value',
771  'inArguments' => 'staticArguments' // either 'dynamicArguments' or 'staticArguments'
772  ]);
773  return ‪Permutation::create($variables)
774  ->withTargets(
775  ‪TestSet::create($parentSet)
776  ->withMergedApplicables(‪LanguageContext::create(0))
777  ->withTargetPageId(1100)
778  ->withUrl(
780  'https://acme.us/welcome/enhance/[[value]][[pathSuffix]]',
781  ‪Variables::create(['pathSuffix' => ''])
782  )
783  )
784  )
785  ->withApplicableSet(
787  'value' => 'hundred',
788  'resolveValue' => 100,
789  ])),
791  'value' => 'hundred/binary',
792  'resolveValue' => 1100100,
793  ])),
796  'value' => 'hundred',
797  'resolveValue' => 100,
798  ])),
799  ‪EnhancerDeclaration::create('requirements.value=/[a-z_/]+/')->withConfiguration([
800  'requirements' => [
801  'value' => '[a-z_/]+',
802  ]
803  ])
804  ),
807  'value' => 'hundred/binary',
808  'resolveValue' => 1100100,
809  ])),
810  ‪EnhancerDeclaration::create('requirements.value=/[a-z_/]+/')->withConfiguration([
811  'requirements' => [
812  'value' => '[a-z_/]+',
813  ]
814  ])
815  )
816  )
817  ->withApplicableItems($builder->declareEnhancers())
818  ->withApplicableSet(
819  ‪AspectDeclaration::create('StaticValueMapper')->withConfiguration([
820  ‪VariableItem::create('aspectName', [
821  'type' => 'StaticValueMapper',
822  'map' => [
823  'hundred' => 100,
824  'hundred/binary' => 1100100,
825  ],
826  ])
827  ])
828  )
829  ->permute()
830  ->getTargetsForDataProvider();
831  }
832 
839  public function ‪routeRequirementsHavingAspectsAreConsidered(TestSet $testSet): void
840  {
842  }
843 
844  public function ‪routeRequirementsAreConsideredDataProvider($parentSet = null): array
845  {
846  $builder = ‪Builder::create();
847  // variables (applied when invoking expectations)
848  $variables = ‪Variables::create()->define([
849  'resolveValue' => 100,
850  'routePrefix' => 'enhance',
851  'aspectName' => 'value',
852  'inArguments' => 'dynamicArguments' // either 'dynamicArguments' or 'staticArguments'
853  ]);
854  $enhancers = $builder->declareEnhancers();
855  $variableContexts = [
858  'cHash' => '46227b4ce096dc78a4e71463326c9020',
859  ])
860  )->withRequiredApplicables($enhancers['Simple']),
863  'cHash' => 'e24d3d2d5503baba670d827c3b9470c8',
864  ])
865  )->withRequiredApplicables($enhancers['Plugin']),
868  'cHash' => 'eef21771ab3c3dac3514b4479eedd5ff',
869  ])
870  )->withRequiredApplicables($enhancers['Extbase']),
871  ];
872  return ‪Permutation::create($variables)
873  ->withTargets(
874  ‪TestSet::create($parentSet)
875  ->withMergedApplicables(‪LanguageContext::create(0))
876  ->withTargetPageId(1100)
877  ->withUrl(
879  'https://acme.us/welcome/enhance/[[uriValue]][[pathSuffix]]?cHash=[[cHash]]',
880  ‪Variables::create(['pathSuffix' => ''])
881  )
882  )
883  )
884  ->withApplicableItems($enhancers)
885  ->withApplicableItems($variableContexts)
886  ->withApplicableSet(
888  'uriValue' => 100,
889  ])),
892  'uriValue' => 100,
893  'cHash' => ''
894  ])),
895  ‪ExceptionExpectation::create('Missing cHash')
896  ->withClassName(PageNotFoundException::class)
897  ->withMessage('Request parameters could not be validated (&cHash empty)')
898  ->withCode(1518472189)
899  ),
902  'uriValue' => 99,
903  ])),
905  ->withClassName(PageNotFoundException::class)
906  ->withMessage('The requested page does not exist')
907  ->withCode(1518472189)
908  ),
911  'uriValue' => 99999,
912  ])),
914  ->withClassName(PageNotFoundException::class)
915  ->withMessage('The requested page does not exist')
916  ->withCode(1518472189)
917  ),
920  'uriValue' => 'NaN',
921  ])),
923  ->withClassName(PageNotFoundException::class)
924  ->withMessage('The requested page does not exist')
925  ->withCode(1518472189)
926  )
927  )
928  ->withApplicableSet(
929  ‪EnhancerDeclaration::create('requirements.value=\\d{3}')->withConfiguration([
930  'requirements' => [
931  'value' => '\\d{3}',
932  ]
933  ])
934  )
935  ->permute()
936  ->getTargetsForDataProvider();
937  }
938 
945  public function ‪routeRequirementsAreConsidered(TestSet $testSet): void
946  {
948  }
949 
950  public function ‪routeIdentifiersAreResolvedDataProvider(): array
951  {
952  return [
953  // namespace[value]
954  'namespace[value] ? test' => [
955  'namespace',
956  'value',
957  'test',
958  ],
959  'namespace[value] ? x^30' => [
960  'namespace',
961  'value',
962  str_repeat('x', 30),
963  ],
964  'namespace[value] ? x^31' => [
965  'namespace',
966  'value',
967  str_repeat('x', 31),
968  ],
969  'namespace[value] ? x^32' => [
970  'namespace',
971  'value',
972  str_repeat('x', 32),
973  ],
974  'namespace[value] ? x^33' => [
975  'namespace',
976  'value',
977  str_repeat('x', 33),
978  ],
979  'namespace[value] ? 1^31 (type-cast)' => [
980  'namespace',
981  'value',
982  str_repeat('1', 31),
983  ],
984  // md5('namespace__@otne3') is 60360798585102000952995164024754 (numeric)
985  // md5('ximaz') is 61529519452809720693702583126814 (numeric)
986  'namespace[@otne3] ? numeric-md5 (type-cast)' => [
987  'namespace',
988  '@otne3',
989  md5('ximaz'),
990  ],
991  'namespace[value] ? namespace__value' => [
992  'namespace',
993  'value',
994  'namespace__value',
995  ],
996  'namespace[value] ? namespace/value' => [
997  'namespace',
998  'value',
999  'namespace/value',
1000  'The requested URL is not distinct',
1001  ],
1002  'namespace[value] ? namespace__other' => [
1003  'namespace',
1004  'value',
1005  'namespace__other',
1006  ],
1007  'namespace[value] ? namespace/other' => [
1008  'namespace',
1009  'value',
1010  'namespace/other',
1011  ],
1012  // namespace[any/value]
1013  'namespace[any/value] ? x^30' => [
1014  'namespace',
1015  'any/value',
1016  str_repeat('x', 30),
1017  ],
1018  'namespace[any/value] ? x^31' => [
1019  'namespace',
1020  'any/value',
1021  str_repeat('x', 31),
1022  ],
1023  'namespace[any/value] ? x^32' => [
1024  'namespace',
1025  'any/value',
1026  str_repeat('x', 32),
1027  ],
1028  'namespace[any/value] ? namespace__any__value' => [
1029  'namespace',
1030  'any/value',
1031  'namespace__any__value',
1032  ],
1033  'namespace[any/value] ? namespace/any/value' => [
1034  'namespace',
1035  'any/value',
1036  'namespace/any/value',
1037  'The requested URL is not distinct',
1038  ],
1039  'namespace[any/value] ? namespace__any__other' => [
1040  'namespace',
1041  'any/value',
1042  'namespace__any__other',
1043  ],
1044  'namespace[any/value] ? namespace/any/other' => [
1045  'namespace',
1046  'any/value',
1047  'namespace/any/other',
1048  ],
1049  // namespace[@any/value]
1050  'namespace[@any/value] ? x^30' => [
1051  'namespace',
1052  '@any/value',
1053  str_repeat('x', 30),
1054  ],
1055  'namespace[@any/value] ? x^31' => [
1056  'namespace',
1057  '@any/value',
1058  str_repeat('x', 31),
1059  ],
1060  'namespace[@any/value] ? x^32' => [
1061  'namespace',
1062  '@any/value',
1063  str_repeat('x', 32),
1064  ],
1065  'namespace[@any/value] ? md5(namespace__@any__value)' => [
1066  'namespace',
1067  '@any/value',
1068  md5('namespace__@any__value'),
1069  ],
1070  'namespace[@any/value] ? namespace/@any/value' => [
1071  'namespace',
1072  '@any/value',
1073  'namespace/@any/value',
1074  'The requested URL is not distinct',
1075  ],
1076  'namespace[@any/value] ? md5(namespace__@any__other)' => [
1077  'namespace',
1078  '@any/value',
1079  md5('namespace__@any__other'),
1080  ],
1081  'namespace[@any/value] ? namespace/@any/other' => [
1082  'namespace',
1083  '@any/value',
1084  'namespace/@any/other',
1085  ],
1086  ];
1087  }
1088 
1098  public function ‪routeIdentifiersAreResolved(string $namespace, string $argumentName, string $queryPath, string $failureReason = null)
1099  {
1100  $query = [];
1101  $routeValue = 'route-value';
1102  $queryValue = 'parameter-value';
1103  $query = ‪ArrayUtility::setValueByPath($query, $queryPath, $queryValue);
1104  $queryParameters = http_build_query($query, '', '&', PHP_QUERY_RFC3986);
1105  $targetUri = sprintf('https://acme.us/welcome/%s?%s', $routeValue, $queryParameters);
1106 
1107  $this->‪mergeSiteConfiguration('acme-com', [
1108  'routeEnhancers' => ['Enhancer' => [
1109  'type' => 'Plugin',
1110  'routePath' => '/{name}',
1111  '_arguments' => [
1112  'name' => $argumentName,
1113  ],
1114  'namespace' => $namespace,
1115  ]]
1116  ]);
1117 
1118  $response = $this->executeFrontendRequest(
1119  new InternalRequest($targetUri),
1120  $this->internalRequestContext,
1121  true
1122  );
1123 
1124  $body = (string)$response->getBody();
1125  if ($failureReason === null) {
1126  $pageArguments = json_decode($body, true);
1127  self::assertNotNull($pageArguments, 'PageArguments could not be resolved');
1128 
1129  $expected = [];
1130  $expected = ‪ArrayUtility::setValueByPath($expected, $namespace . '/' . $argumentName, $routeValue);
1131  $expected = ‪ArrayUtility::setValueByPath($expected, $queryPath, $queryValue);
1132  self::assertEquals($expected, $pageArguments['requestQueryParams']);
1133  } else {
1134  self::assertStringContainsString($failureReason, $body);
1135  }
1136  }
1137 
1141  protected function ‪assertPageArgumentsEquals(TestSet $testSet)
1142  {
1143  $builder = ‪Builder::create();
1144  $enhancerConfiguration = $builder->compileEnhancerConfiguration($testSet);
1145  $targetUri = $builder->compileUrl($testSet);
1147  $languageContext = $testSet->getSingleApplicable(LanguageContext::class);
1148  $expectedLanguageId = $languageContext->getLanguageId();
1149  $expectation = $builder->compileResolveArguments($testSet);
1150 
1151  $this->‪mergeSiteConfiguration('acme-com', [
1152  'routeEnhancers' => ['Enhancer' => $enhancerConfiguration]
1153  ]);
1154  $this->‪mergeSiteConfiguration('archive-acme-com', [
1155  'routeEnhancers' => ['Enhancer' => $enhancerConfiguration]
1156  ]);
1157 
1158  $allParameters = array_replace_recursive(
1159  $expectation['dynamicArguments'],
1160  $expectation['staticArguments']
1161  );
1162  $expectation['pageId'] = $testSet->getTargetPageId();
1163  $expectation['pageType'] = '0';
1164  $expectation['languageId'] = $expectedLanguageId;
1165  $expectation['requestQueryParams'] = $allParameters;
1166  $expectation['_GET'] = $allParameters;
1167 
1168  $response = $this->executeFrontendRequest(
1169  new InternalRequest($targetUri),
1170  $this->internalRequestContext,
1171  true
1172  );
1173 
1175  $exceptionDeclaration = $testSet->getSingleApplicable(ExceptionExpectation::class);
1176  if ($exceptionDeclaration !== null) {
1177  // @todo This part is "ugly"...
1178  self::assertSame(404, $response->getStatusCode());
1179  self::assertStringContainsString(
1180  // searching in HTML content...
1181  htmlspecialchars($exceptionDeclaration->getMessage()),
1182  (string)$response->getBody()
1183  );
1184  } else {
1185  $pageArguments = json_decode((string)$response->getBody(), true);
1186  self::assertSame(200, $response->getStatusCode());
1187  self::assertEquals($expectation, $pageArguments);
1188  }
1189  }
1190 
1196  public function ‪nestedRouteArgumentsAreConsidered(TestSet $testSet): void
1197  {
1198  $this->‪assertPageArgumentsEquals($testSet);
1199  }
1200 }
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\ExceptionExpectation\create
‪static create(string $identifier)
Definition: ExceptionExpectation.php:38
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\pageTypeDecoratorIsApplied
‪pageTypeDecoratorIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:554
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\setUpDatabase
‪setUpDatabase()
Definition: EnhancerSiteRequestTest.php:99
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeIdentifiersAreResolvedDataProvider
‪routeIdentifiersAreResolvedDataProvider()
Definition: EnhancerSiteRequestTest.php:947
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Permutation
Definition: Permutation.php:23
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\$internalRequestContext
‪InternalRequestContext $internalRequestContext
Definition: EnhancerSiteRequestTest.php:52
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariableItem\create
‪static create(string $key, $value)
Definition: VariableItem.php:35
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\pageTypeDecoratorIndexCanBePartOfSlugDataProvider
‪array pageTypeDecoratorIndexCanBePartOfSlugDataProvider()
Definition: EnhancerSiteRequestTest.php:598
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪array buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:142
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\TestSetDataProviderTrait
Definition: TestSetDataProviderTrait.php:33
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\staticValueMapperIsApplied
‪staticValueMapperIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:436
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\writeSiteConfiguration
‪writeSiteConfiguration(string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
Definition: SiteBasedTestTrait.php:58
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\AspectDeclaration\create
‪static create(string $identifier)
Definition: AspectDeclaration.php:30
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeIdentifiersAreResolved
‪routeIdentifiersAreResolved(string $namespace, string $argumentName, string $queryPath, string $failureReason=null)
Definition: EnhancerSiteRequestTest.php:1095
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase
Definition: AbstractTestCase.php:29
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\ApplicableConjunction\create
‪static create(Applicable ... $applicables)
Definition: ApplicableConjunction.php:26
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Variables
Definition: Variables.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariablesContext\create
‪static create(Variables $variables)
Definition: VariablesContext.php:28
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeDefaultsAreConsidered
‪routeDefaultsAreConsidered(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:756
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariablesContext
Definition: VariablesContext.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Permutation\create
‪static create(Variables $variables)
Definition: Permutation.php:40
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\TestSet
Definition: TestSet.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\persistedPatternMapperIsApplied
‪persistedPatternMapperIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:366
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Builder
Definition: Builder.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest
Definition: EnhancerSiteRequestTest.php:44
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Builder\create
‪static create()
Definition: Builder.php:22
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪array buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:124
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\tearDown
‪tearDown()
Definition: EnhancerSiteRequestTest.php:135
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariableValue\create
‪static create(string $value, Variables $defaultVariables=null)
Definition: VariableValue.php:39
‪TYPO3\CMS\Core\Core\Bootstrap\initializeLanguageObject
‪static initializeLanguageObject()
Definition: Bootstrap.php:617
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\staticRangeMapperIsApplied
‪staticRangeMapperIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:508
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\staticRangeMapperDataProvider
‪array staticRangeMapperDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:445
‪TYPO3\CMS\Core\Error\Http\PageNotFoundException
Definition: PageNotFoundException.php:24
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\Variables\create
‪static create(array $items=[])
Definition: Variables.php:22
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\EnhancerDeclaration\create
‪static create(string $identifier)
Definition: EnhancerDeclaration.php:38
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\$siteTitle
‪string $siteTitle
Definition: EnhancerSiteRequestTest.php:48
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeRequirementsAreConsidered
‪routeRequirementsAreConsidered(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:942
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\pageTypeDecoratorIsAppliedDataProvider
‪array pageTypeDecoratorIsAppliedDataProvider()
Definition: EnhancerSiteRequestTest.php:516
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\TestSet\getTargetPageId
‪int null getTargetPageId()
Definition: TestSet.php:57
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\nestedRouteArgumentsAreConsidered
‪nestedRouteArgumentsAreConsidered(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:1193
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\setUpBeforeClass
‪static setUpBeforeClass()
Definition: EnhancerSiteRequestTest.php:54
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\persistedAliasMapperDataProvider
‪array persistedAliasMapperDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:251
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\AspectDeclaration
Definition: AspectDeclaration.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\localeModifierDataProvider
‪array localeModifierDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:145
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\ExceptionExpectation
Definition: ExceptionExpectation.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\staticValueMapperDataProvider
‪array staticValueMapperDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:375
‪TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath
‪static array setValueByPath(array $array, $path, $value, $delimiter='/')
Definition: ArrayUtility.php:272
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\TestSet\getSingleApplicable
‪getSingleApplicable(string $type)
Definition: TestSet.php:74
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\localeModifierIsApplied
‪localeModifierIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:242
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\assertPageArgumentsEquals
‪assertPageArgumentsEquals(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:1138
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling
Definition: AbstractTestCase.php:18
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeRequirementsHavingAspectsAreConsideredDataProvider
‪routeRequirementsHavingAspectsAreConsideredDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:761
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:24
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\persistedAliasMapperIsApplied
‪persistedAliasMapperIsApplied(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:304
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeRequirementsHavingAspectsAreConsidered
‪routeRequirementsHavingAspectsAreConsidered(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:836
‪TYPO3\CMS\Core\Core\Bootstrap
Definition: Bootstrap.php:66
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeRequirementsAreConsideredDataProvider
‪routeRequirementsAreConsideredDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:841
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariableItem
Definition: VariableItem.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\persistedPatternMapperDataProvider
‪array persistedPatternMapperDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:313
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪array buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:109
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\LanguageContext
Definition: LanguageContext.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\ApplicableConjunction
Definition: ApplicableConjunction.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\VariableValue
Definition: VariableValue.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\EnhancerDeclaration
Definition: EnhancerDeclaration.php:21
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\mergeSiteConfiguration
‪mergeSiteConfiguration(string $identifier, array $overrides)
Definition: SiteBasedTestTrait.php:88
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\TestSet\create
‪static create($parentSet=null)
Definition: TestSet.php:38
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\pageTypeDecoratorIndexCanBePartOfSlug
‪pageTypeDecoratorIndexCanBePartOfSlug(TestSet $testSet)
Definition: EnhancerSiteRequestTest.php:631
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\tearDownAfterClass
‪static tearDownAfterClass()
Definition: EnhancerSiteRequestTest.php:60
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\Framework\Builder\LanguageContext\create
‪static create(int $languageId)
Definition: LanguageContext.php:24
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\routeDefaultsAreConsideredDataProvider
‪routeDefaultsAreConsideredDataProvider($parentSet=null)
Definition: EnhancerSiteRequestTest.php:666
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\EnhancerSiteRequestTest\setUp
‪setUp()
Definition: EnhancerSiteRequestTest.php:66