‪TYPO3CMS  9.5
SlugSiteRequestTest.php
Go to the documentation of this file.
1 <?php
2 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 
21 use TYPO3\TestingFramework\Core\Functional\Framework\DataHandling\Scenario\DataHandlerFactory;
22 use TYPO3\TestingFramework\Core\Functional\Framework\DataHandling\Scenario\DataHandlerWriter;
23 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
24 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequestContext;
25 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent;
26 
31 {
35  private ‪$siteTitle = 'A Company that Manufactures Everything Inc';
36 
41 
42  public static function ‪setUpBeforeClass()
43  {
44  parent::setUpBeforeClass();
45  static::initializeDatabaseSnapshot();
46  }
47 
48  public static function ‪tearDownAfterClass()
49  {
50  static::destroyDatabaseSnapshot();
51  parent::tearDownAfterClass();
52  }
53 
54  protected function ‪setUp()
55  {
56  parent::setUp();
57 
58  // these settings are forwarded to the frontend sub-request as well
59  $this->internalRequestContext = (new InternalRequestContext())
60  ->withGlobalSettings(['TYPO3_CONF_VARS' => static::TYPO3_CONF_VARS]);
61 
62  $this->withDatabaseSnapshot(function () {
63  $this->‪setUpDatabase();
64  });
65  }
66 
67  protected function ‪setUpDatabase()
68  {
69  $backendUser = $this->setUpBackendUserFromFixture(1);
71 
72  $scenarioFile = __DIR__ . '/Fixtures/SlugScenario.yaml';
73  $factory = DataHandlerFactory::fromYamlFile($scenarioFile);
74  $writer = DataHandlerWriter::withBackendUser($backendUser);
75  $writer->invokeFactory($factory);
76  static::failIfArrayIsNotEmpty(
77  $writer->getErrors()
78  );
79 
80  $this->setUpFrontendRootPage(
81  1000,
82  [
83  'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript',
84  'typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/JsonRenderer.typoscript',
85  ],
86  [
87  'title' => 'ACME Root',
88  'sitetitle' => $this->siteTitle,
89  ]
90  );
91  }
92 
93  protected function ‪tearDown()
94  {
95  unset($this->internalRequestContext);
96  parent::tearDown();
97  }
98 
103  {
104  $domainPaths = [
105  'https://website.local/',
106  'https://website.local/?',
107  'https://website.local//',
108  ];
109 
110  return $this->wrapInArray(
111  $this->keysFromValues($domainPaths)
112  );
113  }
114 
122  {
124  'website-local',
125  $this->‪buildSiteConfiguration(1000, 'https://website.local/')
126  );
127 
128  $expectedStatusCode = 307;
129  $expectedHeaders = ['location' => ['https://website.local/welcome']];
130 
131  $response = $this->executeFrontendRequest(
132  new InternalRequest($uri),
133  $this->internalRequestContext
134  );
135  static::assertSame($expectedStatusCode, $response->getStatusCode());
136  static::assertSame($expectedHeaders, $response->getHeaders());
137  }
138 
142  public function ‪shortcutsAreRedirectedDataProvider(): array
143  {
144  $domainPaths = [
145  'https://website.local/',
146  'https://website.local/?',
147  'https://website.local//',
148  ];
149 
150  return $this->wrapInArray(
151  $this->keysFromValues($domainPaths)
152  );
153  }
154 
161  public function ‪shortcutsAreRedirectedToDefaultSiteLanguage(string $uri)
162  {
164  'website-local',
165  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
166  [
167  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/'),
168  ]
169  );
170 
171  $expectedStatusCode = 307;
172  $expectedHeaders = [
173  'location' => ['https://website.local/en-en/'],
174  ];
175 
176  $response = $this->executeFrontendRequest(
177  new InternalRequest($uri),
178  $this->internalRequestContext
179  );
180  static::assertSame($expectedStatusCode, $response->getStatusCode());
181  static::assertSame($expectedHeaders, $response->getHeaders());
182  }
183 
190  public function ‪shortcutsAreRedirectedAndRenderFirstSubPage(string $uri)
191  {
193  'website-local',
194  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
195  [
196  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/'),
197  ]
198  );
199 
200  $expectedStatusCode = 200;
201  $expectedPageTitle = 'EN: Welcome';
202 
203  $response = $this->executeFrontendRequest(
204  new InternalRequest($uri),
205  $this->internalRequestContext,
206  true
207  );
208  $responseStructure = ResponseContent::fromString(
209  (string)$response->getBody()
210  );
211 
212  static::assertSame(
213  $expectedStatusCode,
214  $response->getStatusCode()
215  );
216  static::assertSame(
217  $this->siteTitle,
218  $responseStructure->getScopePath('template/sitetitle')
219  );
220  static::assertSame(
221  $expectedPageTitle,
222  $responseStructure->getScopePath('page/title')
223  );
224  }
225 
230  {
232  'website-local',
233  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
234  [
235  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/'),
236  ],
237  $this->‪buildErrorHandlingConfiguration('Fluid', [404])
238  );
239 
240  $expectedStatusCode = 307;
241  $expectedHeaders = ['location' => ['https://website.local/en-en/welcome']];
242 
243  $uri = 'https://website.other/any/invalid/slug';
244  $response = $this->executeFrontendRequest(
245  new InternalRequest($uri),
246  $this->internalRequestContext
247  );
248 
249  static::assertSame(
250  $expectedStatusCode,
251  $response->getStatusCode()
252  );
253  static::assertSame(
254  $expectedHeaders,
255  $response->getHeaders()
256  );
257  // @todo Expected page not found response (404) instead
258  // static::assertContains(
259  // 'message: The requested page does not exist',
260  // (string)$response->getBody()
261  // );
262  }
263 
268  {
270  'website-local',
271  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
272  [
273  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/')
274  ],
275  $this->‪buildErrorHandlingConfiguration('Fluid', [404])
276  );
277 
278  $uri = 'https://website.local/any/invalid/slug';
279  $response = $this->executeFrontendRequest(
280  new InternalRequest($uri),
281  $this->internalRequestContext
282  );
283 
284  static::assertSame(
285  404,
286  $response->getStatusCode()
287  );
288  static::assertStringContainsString(
289  'message: The requested page does not exist',
290  (string)$response->getBody()
291  );
292  }
293 
298  {
300  'website-local',
301  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
302  [
303  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/')
304  ],
305  $this->‪buildErrorHandlingConfiguration('Fluid', [404])
306  );
307 
308  $uri = 'https://website.local/en-en/any/invalid/slug';
309  $response = $this->executeFrontendRequest(
310  new InternalRequest($uri),
311  $this->internalRequestContext
312  );
313 
314  static::assertSame(
315  404,
316  $response->getStatusCode()
317  );
318  static::assertContains(
319  'message: The requested page does not exist',
320  (string)$response->getBody()
321  );
322  }
323 
328  {
330  'website-local',
331  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
332  [
333  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/')
334  ],
335  $this->‪buildErrorHandlingConfiguration('Fluid', [404])
336  );
337 
338  $uri = 'https://website.local/en-en/?type=13';
339  $response = $this->executeFrontendRequest(
340  new InternalRequest($uri),
341  $this->internalRequestContext
342  );
343 
344  self::assertSame(
345  404,
346  $response->getStatusCode()
347  );
348  self::assertStringContainsString(
349  'message: The page is not configured',
350  (string)$response->getBody()
351  );
352  }
353 
357  public function ‪pageIsRenderedWithPathsDataProvider(): array
358  {
359  $domainPaths = [
360  'https://website.local/en-en/welcome',
361  'https://website.local/fr-fr/bienvenue',
362  'https://website.local/fr-ca/bienvenue',
363  ];
364 
365  return array_map(
366  function (string $uri) {
367  if (strpos($uri, '/fr-fr/') !== false) {
368  $expectedPageTitle = 'FR: Welcome';
369  } elseif (strpos($uri, '/fr-ca/') !== false) {
370  $expectedPageTitle = 'FR-CA: Welcome';
371  } else {
372  $expectedPageTitle = 'EN: Welcome';
373  }
374  return [$uri, $expectedPageTitle];
375  },
376  $this->keysFromValues($domainPaths)
377  );
378  }
379 
387  public function ‪pageIsRenderedWithPaths(string $uri, string $expectedPageTitle)
388  {
390  'website-local',
391  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
392  [
393  $this->‪buildDefaultLanguageConfiguration('EN', '/en-en/'),
394  $this->‪buildLanguageConfiguration('FR', '/fr-fr/', ['EN']),
395  $this->‪buildLanguageConfiguration('FR-CA', '/fr-ca/', ['FR', 'EN']),
396  ]
397  );
398 
399  $response = $this->executeFrontendRequest(
400  new InternalRequest($uri),
401  $this->internalRequestContext
402  );
403  $responseStructure = ResponseContent::fromString(
404  (string)$response->getBody()
405  );
406 
407  static::assertSame(
408  200,
409  $response->getStatusCode()
410  );
411  static::assertSame(
412  $this->siteTitle,
413  $responseStructure->getScopePath('template/sitetitle')
414  );
415  static::assertSame(
416  $expectedPageTitle,
417  $responseStructure->getScopePath('page/title')
418  );
419  }
420 
424  public function ‪pageIsRenderedWithDomainsDataProvider(): array
425  {
426  $domainPaths = [
427  'https://website.us/welcome',
428  'https://website.fr/bienvenue',
429  'https://website.ca/bienvenue',
430  ];
431 
432  return array_map(
433  function (string $uri) {
434  if (strpos($uri, '.fr/') !== false) {
435  $expectedPageTitle = 'FR: Welcome';
436  } elseif (strpos($uri, '.ca/') !== false) {
437  $expectedPageTitle = 'FR-CA: Welcome';
438  } else {
439  $expectedPageTitle = 'EN: Welcome';
440  }
441  return [$uri, $expectedPageTitle];
442  },
443  $this->keysFromValues($domainPaths)
444  );
445  }
446 
454  public function ‪pageIsRenderedWithDomains(string $uri, string $expectedPageTitle)
455  {
457  'website-local',
458  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
459  [
460  $this->‪buildDefaultLanguageConfiguration('EN', 'https://website.us/'),
461  $this->‪buildLanguageConfiguration('FR', 'https://website.fr/', ['EN']),
462  $this->‪buildLanguageConfiguration('FR-CA', 'https://website.ca/', ['FR', 'EN']),
463  ]
464  );
465 
466  $response = $this->executeFrontendRequest(
467  new InternalRequest($uri),
468  $this->internalRequestContext
469  );
470  $responseStructure = ResponseContent::fromString(
471  (string)$response->getBody()
472  );
473 
474  static::assertSame(
475  200,
476  $response->getStatusCode()
477  );
478  static::assertSame(
479  $this->siteTitle,
480  $responseStructure->getScopePath('template/sitetitle')
481  );
482  static::assertSame(
483  $expectedPageTitle,
484  $responseStructure->getScopePath('page/title')
485  );
486  }
487 
491  public function ‪restrictedPageIsRenderedDataProvider(): array
492  {
493  $instructions = [
494  // frontend user 1
495  ['https://website.local/my-acme/whitepapers', 1, 'Whitepapers'],
496  ['https://website.local/my-acme/whitepapers/products', 1, 'Products'],
497  ['https://website.local/my-acme/whitepapers/solutions', 1, 'Solutions'],
498  // frontend user 2
499  ['https://website.local/my-acme/whitepapers', 2, 'Whitepapers'],
500  ['https://website.local/my-acme/whitepapers/products', 2, 'Products'],
501  ['https://website.local/my-acme/whitepapers/research', 2, 'Research'],
502  ['https://website.local/my-acme/forecasts', 2, 'Forecasts'],
503  ['https://website.local/my-acme/forecasts/current-year', 2, 'Current Year'],
504  // frontend user 3
505  ['https://website.local/my-acme/whitepapers', 3, 'Whitepapers'],
506  ['https://website.local/my-acme/whitepapers/products', 3, 'Products'],
507  ['https://website.local/my-acme/whitepapers/solutions', 3, 'Solutions'],
508  ['https://website.local/my-acme/whitepapers/research', 3, 'Research'],
509  ['https://website.local/my-acme/forecasts', 3, 'Forecasts'],
510  ['https://website.local/my-acme/forecasts/current-year', 3, 'Current Year'],
511  ];
512 
513  return $this->keysFromTemplate($instructions, '%1$s (user:%2$s)');
514  }
515 
524  public function ‪restrictedPageIsRendered(string $uri, int $frontendUserId, string $expectedPageTitle)
525  {
527  'website-local',
528  $this->‪buildSiteConfiguration(1000, 'https://website.local/')
529  );
530 
531  $response = $this->executeFrontendRequest(
532  new InternalRequest($uri),
533  $this->internalRequestContext
534  ->withFrontendUserId($frontendUserId)
535  );
536  $responseStructure = ResponseContent::fromString(
537  (string)$response->getBody()
538  );
539 
540  static::assertSame(
541  200,
542  $response->getStatusCode()
543  );
544  static::assertSame(
545  $this->siteTitle,
546  $responseStructure->getScopePath('template/sitetitle')
547  );
548  static::assertSame(
549  $expectedPageTitle,
550  $responseStructure->getScopePath('page/title')
551  );
552  }
553 
558  {
559  $instructions = [
560  // no frontend user given
561  ['https://website.local/my-acme/whitepapers', 0],
562  // ['https://website.local/my-acme/whitepapers/products', 0], // @todo extendToSubpages currently missing
563  ['https://website.local/my-acme/whitepapers/solutions', 0],
564  ['https://website.local/my-acme/whitepapers/research', 0],
565  ['https://website.local/my-acme/forecasts', 0],
566  // ['https://website.local/my-acme/forecasts/current-year', 0], // @todo extendToSubpages currently missing
567  // frontend user 1
568  ['https://website.local/my-acme/whitepapers/research', 1],
569  ['https://website.local/my-acme/forecasts', 1],
570  // ['https://website.local/my-acme/forecasts/current-year', 1], // @todo extendToSubpages currently missing
571  // frontend user 2
572  ['https://website.local/my-acme/whitepapers/solutions', 2],
573  ];
574 
575  return $this->keysFromTemplate($instructions, '%1$s (user:%2$s)');
576  }
577 
586  {
588  'website-local',
589  $this->‪buildSiteConfiguration(1000, 'https://website.local/')
590  );
591 
592  $response = $this->executeFrontendRequest(
593  new InternalRequest($uri),
594  $this->internalRequestContext
595  ->withFrontendUserId($frontendUserId)
596  );
597 
598  static::assertSame(
599  403,
600  $response->getStatusCode()
601  );
602  static::assertThat(
603  (string)$response->getBody(),
604  static::logicalOr(
605  static::stringContains('Reason: ID was not an accessible page'),
606  static::stringContains('Reason: Subsection was found and not accessible')
607  )
608  );
609  }
610 
619  {
621  'website-local',
622  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
623  [],
624  $this->‪buildErrorHandlingConfiguration('Fluid', [403])
625  );
626 
627  $response = $this->executeFrontendRequest(
628  new InternalRequest($uri),
629  $this->internalRequestContext
630  ->withFrontendUserId($frontendUserId)
631  );
632 
633  static::assertSame(
634  403,
635  $response->getStatusCode()
636  );
637  static::assertContains(
638  'reasons: code,fe_group',
639  (string)$response->getBody()
640  );
641  static::assertThat(
642  (string)$response->getBody(),
643  static::logicalOr(
644  static::stringContains('message: ID was not an accessible page'),
645  static::stringContains('message: Subsection was found and not accessible')
646  )
647  );
648  }
649 
659  {
660  $this->markTestSkipped('Skipped until PageContentErrorHandler::handlePageError does not use HTTP anymore');
661 
663  'website-local',
664  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
665  [],
666  $this->‪buildErrorHandlingConfiguration('Page', [403])
667  );
668 
669  $response = $this->executeFrontendRequest(
670  new InternalRequest($uri),
671  $this->internalRequestContext
672  ->withFrontendUserId($frontendUserId)
673  );
674 
675  static::assertSame(
676  403,
677  $response->getStatusCode()
678  );
679  }
680 
689  {
691  'website-local',
692  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
693  [],
694  $this->‪buildErrorHandlingConfiguration('PHP', [403])
695  );
696 
697  $response = $this->executeFrontendRequest(
698  new InternalRequest($uri),
699  $this->internalRequestContext
700  ->withFrontendUserId($frontendUserId)
701  );
702  $json = json_decode((string)$response->getBody(), true);
703 
704  static::assertSame(
705  403,
706  $response->getStatusCode()
707  );
708  static::assertThat(
709  $json['message'] ?? null,
710  static::logicalOr(
711  static::identicalTo('ID was not an accessible page'),
712  static::identicalTo('Subsection was found and not accessible')
713  )
714  );
715  }
716 
721  {
722  $domainPaths = [
723  'https://website.local/',
724  ];
725 
726  $queries = [
727  '',
728  'welcome',
729  ];
730 
731  $customQueries = [
732  '?testing[value]=1',
733  '?testing[value]=1&cHash=',
734  '?testing[value]=1&cHash=WRONG',
735  ];
736 
737  return $this->wrapInArray(
738  $this->keysFromValues(
739  ‪PermutationUtility::meltStringItems([$domainPaths, $queries, $customQueries])
740  )
741  );
742  }
743 
751  {
753  'website-local',
754  $this->‪buildSiteConfiguration(1000, 'https://website.local/')
755  );
756 
757  $this->expectExceptionCode(1518472189);
758  $this->expectException(PageNotFoundException::class);
759 
760  $this->executeFrontendRequest(
761  new InternalRequest($uri),
762  $this->internalRequestContext
763  );
764  }
765 
773  {
774  $response = $this->executeFrontendRequest(
775  new InternalRequest($uri),
776  $this->internalRequestContext->withMergedGlobalSettings([
777  'TYPO3_CONF_VARS' => [
778  'FE' => [
779  'pageNotFound_handling' => 'READFILE:typo3/sysext/core/Tests/Functional/Fixtures/Frontend/PageError.txt',
780  ]
781  ]
782  ])
783  );
784 
785  static::assertSame(
786  404,
787  $response->getStatusCode()
788  );
789  static::assertThat(
790  (string)$response->getBody(),
791  static::logicalOr(
792  static::stringContains('reason: Request parameters could not be validated (&amp;cHash empty)'),
793  static::stringContains('reason: Request parameters could not be validated (&amp;cHash comparison failed)')
794  )
795  );
796  }
797 
805  {
807  'website-local',
808  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
809  [],
810  $this->‪buildErrorHandlingConfiguration('Fluid', [404])
811  );
812 
813  $response = $this->executeFrontendRequest(
814  new InternalRequest($uri),
815  $this->internalRequestContext
816  );
817 
818  static::assertSame(
819  404,
820  $response->getStatusCode()
821  );
822  static::assertThat(
823  (string)$response->getBody(),
824  static::logicalOr(
825  static::stringContains('message: Request parameters could not be validated (&amp;cHash empty)'),
826  static::stringContains('message: Request parameters could not be validated (&amp;cHash comparison failed)')
827  )
828  );
829  }
830 
839  {
840  $this->markTestSkipped('Skipped until PageContentErrorHandler::handlePageError does not use HTTP anymore');
841 
843  'website-local',
844  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
845  [],
846  $this->‪buildErrorHandlingConfiguration('Page', [404])
847  );
848 
849  $response = $this->executeFrontendRequest(
850  new InternalRequest($uri),
851  $this->internalRequestContext
852  );
853 
854  static::assertSame(
855  404,
856  $response->getStatusCode()
857  );
858  }
859 
867  {
869  'website-local',
870  $this->‪buildSiteConfiguration(1000, 'https://website.local/'),
871  [],
872  $this->‪buildErrorHandlingConfiguration('PHP', [404])
873  );
874 
875  $response = $this->executeFrontendRequest(
876  new InternalRequest($uri),
877  $this->internalRequestContext
878  );
879  $json = json_decode((string)$response->getBody(), true);
880 
881  static::assertSame(
882  404,
883  $response->getStatusCode()
884  );
885  static::assertThat(
886  $json['message'] ?? null,
887  static::logicalOr(
888  static::identicalTo('Request parameters could not be validated (&cHash empty)'),
889  static::identicalTo('Request parameters could not be validated (&cHash comparison failed)')
890  )
891  );
892  }
893 
897  public function ‪pageIsRenderedWithValidCacheHashDataProvider(): array
898  {
899  $domainPaths = [
900  'https://website.local/',
901  ];
902 
903  // cHash has been calculated with encryption key set to
904  // '4408d27a916d51e624b69af3554f516dbab61037a9f7b9fd6f81b4d3bedeccb6'
905  $queries = [
906  // @todo Currently fails since cHash is verified after(!) redirect to page 1100
907  // '?cHash=7d1f13fa91159dac7feb3c824936b39d',
908  // '?cHash=7d1f13fa91159dac7feb3c824936b39d',
909  'welcome?cHash=f42b850e435f0cedd366f5db749fc1af',
910  ];
911 
912  $customQueries = [
913  '&testing[value]=1',
914  ];
915 
916  $dataSet = $this->wrapInArray(
917  $this->keysFromValues(
918  ‪PermutationUtility::meltStringItems([$domainPaths, $queries, $customQueries])
919  )
920  );
921 
922  return $dataSet;
923  }
924 
931  public function ‪pageIsRenderedWithValidCacheHash($uri)
932  {
934  'website-local',
935  $this->‪buildSiteConfiguration(1000, 'https://website.local/')
936  );
937 
938  $response = $this->executeFrontendRequest(
939  new InternalRequest($uri),
940  $this->internalRequestContext
941  );
942  $responseStructure = ResponseContent::fromString(
943  (string)$response->getBody()
944  );
945  static::assertSame(
946  '1',
947  $responseStructure->getScopePath('getpost/testing.value')
948  );
949  }
950 }
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\unconfiguredTypeNumResultsIn404Error
‪unconfiguredTypeNumResultsIn404Error()
Definition: SlugSiteRequestTest.php:325
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest
Definition: SlugSiteRequestTest.php:31
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildErrorHandlingConfiguration
‪array buildErrorHandlingConfiguration(string $handler, array $codes)
Definition: SiteBasedTestTrait.php:182
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRequestSendsNotFoundResponseWithInvalidCacheHash
‪pageRequestSendsNotFoundResponseWithInvalidCacheHash(string $uri)
Definition: SlugSiteRequestTest.php:770
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\invalidSlugInsideSiteLanguageResultsInNotFoundResponse
‪invalidSlugInsideSiteLanguageResultsInNotFoundResponse()
Definition: SlugSiteRequestTest.php:295
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingPageErrorHandling
‪pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingPageErrorHandling(string $uri)
Definition: SlugSiteRequestTest.php:836
‪TYPO3\CMS\Core\Utility\PermutationUtility\meltStringItems
‪static array meltStringItems(array $payload, string $previousResult='')
Definition: PermutationUtility.php:34
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageIsRendered
‪restrictedPageIsRendered(string $uri, int $frontendUserId, string $expectedPageTitle)
Definition: SlugSiteRequestTest.php:522
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\setUp
‪setUp()
Definition: SlugSiteRequestTest.php:52
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingFluidErrorHandling
‪restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingFluidErrorHandling(string $uri, int $frontendUserId)
Definition: SlugSiteRequestTest.php:616
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪array buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:140
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\setUpDatabase
‪setUpDatabase()
Definition: SlugSiteRequestTest.php:65
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRequestThrowsExceptionWithInvalidCacheHashWithoutHavingErrorHandling
‪pageRequestThrowsExceptionWithInvalidCacheHashWithoutHavingErrorHandling(string $uri)
Definition: SlugSiteRequestTest.php:748
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\writeSiteConfiguration
‪writeSiteConfiguration(string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
Definition: SiteBasedTestTrait.php:56
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRenderingStopsWithInvalidCacheHashDataProvider
‪array pageRenderingStopsWithInvalidCacheHashDataProvider()
Definition: SlugSiteRequestTest.php:718
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase
Definition: AbstractTestCase.php:29
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\requestsAreRedirectedWithoutHavingDefaultSiteLanguageDataProvider
‪array requestsAreRedirectedWithoutHavingDefaultSiteLanguageDataProvider()
Definition: SlugSiteRequestTest.php:100
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\$internalRequestContext
‪InternalRequestContext $internalRequestContext
Definition: SlugSiteRequestTest.php:38
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithValidCacheHashDataProvider
‪array pageIsRenderedWithValidCacheHashDataProvider()
Definition: SlugSiteRequestTest.php:895
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithPathsDataProvider
‪array pageIsRenderedWithPathsDataProvider()
Definition: SlugSiteRequestTest.php:355
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\requestsAreRedirectedWithoutHavingDefaultSiteLanguage
‪requestsAreRedirectedWithoutHavingDefaultSiteLanguage(string $uri)
Definition: SlugSiteRequestTest.php:119
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingPhpErrorHandling
‪restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingPhpErrorHandling(string $uri, int $frontendUserId)
Definition: SlugSiteRequestTest.php:686
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪array buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:122
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\shortcutsAreRedirectedToDefaultSiteLanguage
‪shortcutsAreRedirectedToDefaultSiteLanguage(string $uri)
Definition: SlugSiteRequestTest.php:159
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\tearDown
‪tearDown()
Definition: SlugSiteRequestTest.php:91
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\shortcutsAreRedirectedAndRenderFirstSubPage
‪shortcutsAreRedirectedAndRenderFirstSubPage(string $uri)
Definition: SlugSiteRequestTest.php:188
‪TYPO3\CMS\Core\Error\Http\PageNotFoundException
Definition: PageNotFoundException.php:21
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageIsRenderedDataProvider
‪array restrictedPageIsRenderedDataProvider()
Definition: SlugSiteRequestTest.php:489
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\shortcutsAreRedirectedDataProvider
‪array shortcutsAreRedirectedDataProvider()
Definition: SlugSiteRequestTest.php:140
‪TYPO3\CMS\Core\Utility\PermutationUtility
Definition: PermutationUtility.php:22
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\tearDownAfterClass
‪static tearDownAfterClass()
Definition: SlugSiteRequestTest.php:46
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithPaths
‪pageIsRenderedWithPaths(string $uri, string $expectedPageTitle)
Definition: SlugSiteRequestTest.php:385
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\invalidSiteResultsInNotFoundResponse
‪invalidSiteResultsInNotFoundResponse()
Definition: SlugSiteRequestTest.php:227
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling
Definition: AbstractTestCase.php:3
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithoutHavingErrorHandling
‪restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithoutHavingErrorHandling(string $uri, int $frontendUserId)
Definition: SlugSiteRequestTest.php:583
‪TYPO3\CMS\Core\Core\Bootstrap
Definition: Bootstrap.php:50
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingFluidErrorHandling
‪pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingFluidErrorHandling(string $uri)
Definition: SlugSiteRequestTest.php:802
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪array buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:107
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorDataProvider
‪array restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorDataProvider()
Definition: SlugSiteRequestTest.php:555
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingPageErrorHandling
‪restrictedPageSendsForbiddenResponseWithUnauthorizedVisitorWithHavingPageErrorHandling(string $uri, int $frontendUserId)
Definition: SlugSiteRequestTest.php:656
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithValidCacheHash
‪pageIsRenderedWithValidCacheHash($uri)
Definition: SlugSiteRequestTest.php:929
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingPhpErrorHandling
‪pageRequestSendsNotFoundResponseWithInvalidCacheHashWithHavingPhpErrorHandling(string $uri)
Definition: SlugSiteRequestTest.php:864
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\$siteTitle
‪string $siteTitle
Definition: SlugSiteRequestTest.php:34
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\invalidSlugOutsideSiteLanguageResultsInNotFoundResponse
‪invalidSlugOutsideSiteLanguageResultsInNotFoundResponse()
Definition: SlugSiteRequestTest.php:265
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\setUpBeforeClass
‪static setUpBeforeClass()
Definition: SlugSiteRequestTest.php:40
‪TYPO3\CMS\Core\Core\Bootstrap\initializeLanguageObject
‪static Bootstrap null initializeLanguageObject()
Definition: Bootstrap.php:986
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithDomains
‪pageIsRenderedWithDomains(string $uri, string $expectedPageTitle)
Definition: SlugSiteRequestTest.php:452
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugSiteRequestTest\pageIsRenderedWithDomainsDataProvider
‪array pageIsRenderedWithDomainsDataProvider()
Definition: SlugSiteRequestTest.php:422