‪TYPO3CMS  11.5
TypoScriptFrontendControllerTest.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\MockObject\MockObject;
21 use Prophecy\Argument;
22 use Prophecy\PhpUnit\ProphecyTrait;
23 use Psr\Container\ContainerInterface;
24 use Psr\EventDispatcher\EventDispatcherInterface;
25 use Psr\Http\Message\ServerRequestInterface;
40 use TYPO3\CMS\Core\Package\PackageManager;
41 use TYPO3\CMS\Core\Page\PageRenderer;
49 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
51 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
52 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
53 
57 class ‪TypoScriptFrontendControllerTest extends UnitTestCase
58 {
59  use ProphecyTrait;
60 
64  protected ‪$resetSingletonInstances = true;
65 
69  protected MockObject ‪$subject;
70 
71  protected function ‪setUp(): void
72  {
73  parent::setUp();
74  $this->subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
75  $this->subject->_set('context', new ‪Context());
76  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '170928423746123078941623042360abceb12341234231';
77 
78  $pageRepository = $this->getMockBuilder(PageRepository::class)->getMock();
79  $this->subject->sys_page = $pageRepository;
80 
81  $pageRenderer = $this->getMockBuilder(PageRenderer::class)->getMock();
82  $this->subject->_set('pageRenderer', $pageRenderer);
83  }
84 
93  {
94  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest('https://www.example.com/'))
95  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE);
97  $contentObjectRendererProphecy = $this->prophesize(ContentObjectRenderer::class);
98  $contentObjectRendererProphecy->stdWrapValue(Argument::cetera())->willReturn('');
99  ‪$GLOBALS['TSFE']->cObj = $contentObjectRendererProphecy->reveal();
100  ‪$GLOBALS['TSFE']->INTincScript($this->prophesize(ServerRequestInterface::class)->reveal());
101  self::assertStringContainsString('headerData', ‪$GLOBALS['TSFE']->content);
102  self::assertStringContainsString('footerData', ‪$GLOBALS['TSFE']->content);
103  }
104 
109  {
110  ‪$GLOBALS['TSFE']->additionalHeaderData[] = 'headerData';
111  ‪$GLOBALS['TSFE']->additionalFooterData[] = 'footerData';
112  }
113 
121  {
122  $tsfe = $this->getMockBuilder(TypoScriptFrontendController::class)
123  ->onlyMethods([
124  'processNonCacheableContentPartsAndSubstituteContentMarkers',
125  'INTincScript_loadJSCode',
126  'setAbsRefPrefix',
127  ])
128  ->addMethods(['regeneratePageTitle'])->disableOriginalConstructor()
129  ->getMock();
130  $tsfe->expects(self::exactly(2))->method('processNonCacheableContentPartsAndSubstituteContentMarkers')->willReturnCallback([$this, 'processNonCacheableContentPartsAndSubstituteContentMarkers']);
131 
136  GeneralUtility::setSingletonInstance(
137  EventDispatcherInterface::class,
138  new EventDispatcher(
139  new ‪ListenerProvider($this->createMock(ContainerInterface::class))
140  )
141  );
142 
143  $tsfe->content = file_get_contents(__DIR__ . '/Fixtures/renderedPage.html');
144  $config = [
145  'INTincScript_ext' => [
146  'divKey' => '679b52796e75d474ccbbed486b6837ab',
147  ],
148  'INTincScript' => [
149  'INT_SCRIPT.679b52796e75d474ccbbed486b6837ab' => [],
150  ],
151  ];
152  $tsfe->config = $config;
153 
154  return $tsfe;
155  }
156 
165  {
166  $packageManagerProphecy = $this->prophesize(PackageManager::class);
167  $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
168  $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
169  $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
170  $cacheManagerProphecy = $this->prophesize(CacheManager::class);
171  $cacheManagerProphecy->getCache('l10n')->willReturn($cacheFrontendProphecy->reveal());
172  $languageService = new LanguageService(new Locales(), new LocalizationFactory(new LanguageStore($packageManagerProphecy->reveal()), $cacheManagerProphecy->reveal()), $cacheFrontendProphecy->reveal());
173  $languageServiceFactoryProphecy = $this->prophesize(LanguageServiceFactory::class);
174  $languageServiceFactoryProphecy->createFromSiteLanguage(Argument::type(SiteLanguage::class))->will(static function (‪$args) use ($languageService) {
175  $languageService->init(‪$args[0]->getTypo3Language());
176  return $languageService;
177  });
178  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
179  $string = ‪StringUtility::getUniqueId();
180  $site = $this->‪createSiteWithDefaultLanguage([
181  'locale' => 'fr',
182  'typo3Language' => 'fr',
183  ]);
184  $this->subject->page = [];
185  $this->subject->_set('language', $site->getLanguageById(0));
186  $this->subject->_call('setOutputLanguage');
187  self::assertEquals($string, $this->subject->sL($string));
188  }
189 
197  public function ‪getSysDomainCacheDataProvider(): array
198  {
199  return [
200  'typo3.org' => [
201  'typo3.org',
202  ],
203  'foo.bar' => [
204  'foo.bar',
205  ],
206  'example.com' => [
207  'example.com',
208  ],
209  ];
210  }
211 
215  public function ‪baseUrlWrapHandlesDifferentUrlsDataProvider(): array
216  {
217  return [
218  'without base url' => [
219  '',
220  'fileadmin/user_uploads/image.jpg',
221  'fileadmin/user_uploads/image.jpg',
222  ],
223  'with base url' => [
224  'http://www.google.com/',
225  'fileadmin/user_uploads/image.jpg',
226  'http://www.google.com/fileadmin/user_uploads/image.jpg',
227  ],
228  'without base url but with url prepended with a forward slash' => [
229  '',
230  '/fileadmin/user_uploads/image.jpg',
231  '/fileadmin/user_uploads/image.jpg',
232  ],
233  'with base url but with url prepended with a forward slash' => [
234  'http://www.google.com/',
235  '/fileadmin/user_uploads/image.jpg',
236  '/fileadmin/user_uploads/image.jpg',
237  ],
238  ];
239  }
240 
248  public function ‪baseUrlWrapHandlesDifferentUrls(string $baseUrl, string $url, string $expected): void
249  {
250  $this->subject->baseUrl = $baseUrl;
251  self::assertSame($expected, $this->subject->baseUrlWrap($url));
252  }
253 
258  {
259  return [
260  'one simple search word' => [
261  ['test'],
262  false,
263  'test',
264  ],
265  'one simple search word with standalone words' => [
266  ['test'],
267  true,
268  '[[:space:]]test[[:space:]]',
269  ],
270  'two simple search words' => [
271  ['test', 'test2'],
272  false,
273  'test|test2',
274  ],
275  'two simple search words with standalone words' => [
276  ['test', 'test2'],
277  true,
278  '[[:space:]]test[[:space:]]|[[:space:]]test2[[:space:]]',
279  ],
280  'word with regex chars' => [
281  ['A \\ word with / a bunch of [] regex () chars .*'],
282  false,
283  'A \\\\ word with \\/ a bunch of \\[\\] regex \\(\\) chars \\.\\*',
284  ],
285  ];
286  }
287 
296  public function ‪initializeSearchWordDataBuildsCorrectRegex(array $searchWordGetParameters, bool $enableStandaloneSearchWords, string $expectedRegex): void
297  {
298  $_GET['sword_list'] = $searchWordGetParameters;
299  $_SERVER['HTTP_HOST'] = 'localhost';
300  $_SERVER['SCRIPT_NAME'] = '/index.php';
301 
302  $this->subject->page = [];
303  if ($enableStandaloneSearchWords) {
304  $this->subject->config = ['config' => ['sword_standAlone' => 1]];
305  }
306 
308  $this->subject->preparePageContentGeneration($request);
309  self::assertEquals($this->subject->sWordRegEx, $expectedRegex);
310  }
311 
319  public function ‪splitLinkVarsStringSplitsStringByComma(string $string, array $expected): void
320  {
321  self::assertEquals($expected, $this->subject->_call('splitLinkVarsString', $string));
322  }
323 
327  public function ‪splitLinkVarsDataProvider(): array
328  {
329  return [
330  [
331  'L',
332  ['L'],
333  ],
334  [
335  'L,a',
336  [
337  'L',
338  'a',
339  ],
340  ],
341  [
342  'L, a',
343  [
344  'L',
345  'a',
346  ],
347  ],
348  [
349  'L , a',
350  [
351  'L',
352  'a',
353  ],
354  ],
355  [
356  ' L, a ',
357  [
358  'L',
359  'a',
360  ],
361  ],
362  [
363  'L(1)',
364  [
365  'L(1)',
366  ],
367  ],
368  [
369  'L(1),a',
370  [
371  'L(1)',
372  'a',
373  ],
374  ],
375  [
376  'L(1) , a',
377  [
378  'L(1)',
379  'a',
380  ],
381  ],
382  [
383  'a,L(1)',
384  [
385  'a',
386  'L(1)',
387  ],
388  ],
389  [
390  'L(1),a(2-3)',
391  [
392  'L(1)',
393  'a(2-3)',
394  ],
395  ],
396  [
397  'L(1),a((2-3))',
398  [
399  'L(1)',
400  'a((2-3))',
401  ],
402  ],
403  [
404  'L(1),a(a{2,4})',
405  [
406  'L(1)',
407  'a(a{2,4})',
408  ],
409  ],
410  [
411  'L(1),a(/a{2,4}\,()/)',
412  [
413  'L(1)',
414  'a(/a{2,4}\,()/)',
415  ],
416  ],
417  [
418  'L,a , b(c) , dd(/g{1,2}/), eee(, ()f) , 2',
419  [
420  'L',
421  'a',
422  'b(c)',
423  'dd(/g{1,2}/)',
424  'eee(, ()f)',
425  '2',
426  ],
427  ],
428  ];
429  }
430 
438  public function ‪calculateLinkVarsConsidersCorrectVariables(string $linkVars, array $getVars, string $expected): void
439  {
440  $this->subject->config['config']['linkVars'] = $linkVars;
441  $this->subject->calculateLinkVars($getVars);
442  self::assertEquals($expected, $this->subject->linkVars);
443  }
444 
445  public function ‪calculateLinkVarsDataProvider(): array
446  {
447  return [
448  'simple variable' => [
449  'L',
450  [
451  'L' => 1,
452  ],
453  '&L=1',
454  ],
455  'missing variable' => [
456  'L',
457  [
458  ],
459  '',
460  ],
461  'restricted variables' => [
462  'L(1-3),bar(3),foo(array),blub(array)',
463  [
464  'L' => 1,
465  'bar' => 2,
466  'foo' => [ 1, 2, 'f' => [ 4, 5 ] ],
467  'blub' => 123,
468  ],
469  '&L=1&foo%5B0%5D=1&foo%5B1%5D=2&foo%5Bf%5D%5B0%5D=4&foo%5Bf%5D%5B1%5D=5',
470  ],
471  'nested variables' => [
472  'bar|foo(1-2)',
473  [
474  'bar' => [
475  'foo' => 1,
476  'unused' => 'never',
477  ],
478  ],
479  '&bar[foo]=1',
480  ],
481  ];
482  }
483 
488  {
489  ‪$subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
490  ‪$subject->_call('initializeSearchWordData', null);
491  self::assertEquals('', ‪$subject->sWordRegEx);
492  self::assertEquals('', ‪$subject->sWordList);
493  }
494 
499  {
500  ‪$subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
501  ‪$subject->_call('initializeSearchWordData', '');
502  self::assertEquals('', ‪$subject->sWordRegEx);
503  self::assertEquals('', ‪$subject->sWordList);
504  }
505 
510  {
511  ‪$subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
512  ‪$subject->_call('initializeSearchWordData', []);
513  self::assertEquals('', ‪$subject->sWordRegEx);
514  self::assertEquals([], ‪$subject->sWordList);
515  }
516 
521  {
522  ‪$subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
523  ‪$subject->_call('initializeSearchWordData', ['stop', 'word']);
524  self::assertEquals('stop|word', ‪$subject->sWordRegEx);
525  self::assertEquals(['stop', 'word'], ‪$subject->sWordList);
526  }
527 
532  {
533  ‪$subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
534  ‪$subject->config['config']['sword_standAlone'] = 1;
535  ‪$subject->_call('initializeSearchWordData', ['stop', 'word']);
536  self::assertEquals('[[:space:]]stop[[:space:]]|[[:space:]]word[[:space:]]', ‪$subject->sWordRegEx);
537  self::assertEquals(['stop', 'word'], ‪$subject->sWordList);
538  }
539 
544  public function ‪indexedSearchHookUsesPageTitleApi(): void
545  {
546  $pageTitle = 'This is a test page title coming from PageTitleProviderManager';
547 
548  $pageTitleProvider = $this->prophesize(PageTitleProviderManager::class);
549  $pageTitleProvider->getTitle()->willReturn($pageTitle);
550  $pageTitleProvider->getPageTitleCache()->willReturn([]);
551  GeneralUtility::setSingletonInstance(PageTitleProviderManager::class, $pageTitleProvider->reveal());
552 
553  $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
554  $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
555  $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
556  $cacheManagerProphecy = $this->prophesize(CacheManager::class);
557  $cacheManagerProphecy->getCache('pages')->willReturn($cacheFrontendProphecy->reveal());
558  GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
559 
560  $contentObjectRendererProphecy = $this->prophesize(ContentObjectRenderer::class);
561  $contentObjectRendererProphecy->stdWrapValue(Argument::cetera())->willReturn('');
562  $this->subject->cObj = $contentObjectRendererProphecy->reveal();
563 
564  $this->subject->generatePageTitle();
565  self::assertSame($pageTitle, $this->subject->indexedDocTitle);
566  }
567 
572  {
573  $packageManagerProphecy = $this->prophesize(PackageManager::class);
574  $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
575  $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
576  $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
577  $cacheManagerProphecy = $this->prophesize(CacheManager::class);
578  $cacheManagerProphecy->getCache('pages')->willReturn($cacheFrontendProphecy->reveal());
579  $cacheManagerProphecy->getCache('l10n')->willReturn($cacheFrontendProphecy->reveal());
580  GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
581  ‪$GLOBALS['TYPO3_REQUEST'] = (new ServerRequest('https://www.example.com/'))
582  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE);
583  $site = $this->‪createSiteWithDefaultLanguage([
584  'locale' => 'fr',
585  'typo3Language' => 'fr-test',
586  ]);
587  $languageService = new LanguageService(new Locales(), new LocalizationFactory(new LanguageStore($packageManagerProphecy->reveal()), $cacheManagerProphecy->reveal()), $cacheFrontendProphecy->reveal());
588  $languageServiceFactoryProphecy = $this->prophesize(LanguageServiceFactory::class);
589  $languageServiceFactoryProphecy->createFromSiteLanguage(Argument::type(SiteLanguage::class))->will(static function (‪$args) use ($languageService) {
590  $languageService->init(‪$args[0]->getTypo3Language());
591  return $languageService;
592  });
593  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
594  $frontendUserProphecy = $this->prophesize(FrontendUserAuthentication::class);
595  // Constructor calling initPageRenderer()
596  new TypoScriptFrontendController(
597  new Context(),
598  $site,
599  $site->getLanguageById(0),
600  new PageArguments(13, '0', []),
601  $frontendUserProphecy->reveal()
602  );
603  // since PageRenderer is a singleton, this can be queried via the makeInstance call
604  self::assertEquals('fr-test', GeneralUtility::makeInstance(PageRenderer::class)->getLanguage());
605  }
606 
611  {
612  $packageManagerProphecy = $this->prophesize(PackageManager::class);
613  $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
614  $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
615  $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
616  $cacheManagerProphecy = $this->prophesize(CacheManager::class);
617  $cacheManagerProphecy->getCache('pages')->willReturn($cacheFrontendProphecy->reveal());
618  $cacheManagerProphecy->getCache('l10n')->willReturn($cacheFrontendProphecy->reveal());
619  GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
620  ‪$GLOBALS['TYPO3_REQUEST'] = (new ServerRequest('https://www.example.com/'))
621  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE);
622  $site = $this->‪createSiteWithDefaultLanguage([
623  'locale' => 'fr',
624  'typo3Language' => 'fr',
625  ]);
626  $languageService = new LanguageService(new Locales(), new LocalizationFactory(new LanguageStore($packageManagerProphecy->reveal()), $cacheManagerProphecy->reveal()), $cacheFrontendProphecy->reveal());
627  $languageServiceFactoryProphecy = $this->prophesize(LanguageServiceFactory::class);
628  $languageServiceFactoryProphecy->createFromSiteLanguage(Argument::type(SiteLanguage::class))->will(static function (‪$args) use ($languageService) {
629  $languageService->init(‪$args[0]->getTypo3Language());
630  return $languageService;
631  });
632  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
633  $frontendUserProphecy = $this->prophesize(FrontendUserAuthentication::class);
634  // Constructor calling setOutputLanguage()
635  ‪$subject = $this->getAccessibleMock(
636  TypoScriptFrontendController::class,
637  ['dummy'],
638  [
639  new Context(),
640  $site,
641  $site->getLanguageById(0),
642  new PageArguments(13, '0', []),
643  $frontendUserProphecy->reveal(),
644  ]
645  );
646  $languageService = ‪$subject->_get('languageService');
647  // since PageRenderer is a singleton, this can be queried via the makeInstance call
648  self::assertEquals('fr', $languageService->lang);
649  }
650 
655  {
656  $packageManagerProphecy = $this->prophesize(PackageManager::class);
657  $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
658  $cacheFrontendProphecy->get(Argument::cetera())->willReturn(false);
659  $cacheFrontendProphecy->set(Argument::cetera())->willReturn(null);
660  $cacheManagerProphecy = $this->prophesize(CacheManager::class);
661  $cacheManagerProphecy->getCache('pages')->willReturn($cacheFrontendProphecy->reveal());
662  $cacheManagerProphecy->getCache('l10n')->willReturn($cacheFrontendProphecy->reveal());
663  GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
664  $languageService = new LanguageService(new Locales(), new LocalizationFactory(new LanguageStore($packageManagerProphecy->reveal()), $cacheManagerProphecy->reveal()), $cacheFrontendProphecy->reveal());
665  $languageServiceFactoryProphecy = $this->prophesize(LanguageServiceFactory::class);
666  $languageServiceFactoryProphecy->createFromSiteLanguage(Argument::type(SiteLanguage::class))->will(static function (‪$args) use ($languageService) {
667  $languageService->init(‪$args[0]->getTypo3Language());
668  return $languageService;
669  });
670  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
671 
672  $site = $this->‪createSiteWithDefaultLanguage([
673  'locale' => 'fr',
674  'typo3Language' => 'fr-test',
675  ]);
676 
677  // no MP Parameter given
678  $subject = new TypoScriptFrontendController(
679  new Context(),
680  $site,
681  $site->getLanguageById(0),
682  new PageArguments(13, '0', [], [], []),
683  $this->prophesize(FrontendUserAuthentication::class)->reveal()
684  );
685  self::assertEquals('', ‪$subject->MP);
686 
687  // single MP parameter given
688  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
689  ‪$subject = new TypoScriptFrontendController(
690  new Context(),
691  $site,
692  $site->getLanguageById(0),
693  new PageArguments(13, '0', [], [], ['MP' => '592-182']),
694  $this->prophesize(FrontendUserAuthentication::class)->reveal()
695  );
696  self::assertEquals('592-182', ‪$subject->MP);
697 
698  // invalid characters included
699  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
700  ‪$subject = new TypoScriptFrontendController(
701  new Context(),
702  $site,
703  $site->getLanguageById(0),
704  new PageArguments(13, '0', [], [], ['MP' => '12-13,a34-45/']),
705  $this->prophesize(FrontendUserAuthentication::class)->reveal()
706  );
707  self::assertEquals('12-13,34-45', ‪$subject->MP);
708 
709  // single MP parameter given but MP feature is turned off
710  ‪$GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] = false;
711  GeneralUtility::addInstance(LanguageServiceFactory::class, $languageServiceFactoryProphecy->reveal());
712  ‪$subject = new TypoScriptFrontendController(
713  new Context(),
714  $site,
715  $site->getLanguageById(0),
716  new PageArguments(13, '0', [], [], ['MP' => '592-182']),
717  $this->prophesize(FrontendUserAuthentication::class)->reveal()
718  );
719  self::assertEquals('', ‪$subject->MP);
720  }
721 
722  private function ‪createSiteWithDefaultLanguage(array $languageConfiguration): ‪Site
723  {
724  return new ‪Site('test', 13, [
725  'identifier' => 'test',
726  'rootPageId' => 13,
727  'base' => 'https://www.example.com/',
728  'languages' => [
729  array_merge(
730  $languageConfiguration,
731  [
732  'languageId' => 0,
733  'base' => '/',
734  ]
735  ),
736  ],
737  ]);
738  }
739 }
‪TYPO3\CMS\Core\Localization\LanguageServiceFactory
Definition: LanguageServiceFactory.php:25
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataDoesNothingWithEmptyStringValue
‪initializeSearchWordDataDoesNothingWithEmptyStringValue()
Definition: TypoScriptFrontendControllerTest.php:496
‪TYPO3\CMS\Core\Routing\PageArguments
Definition: PageArguments.php:26
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\getSysDomainCacheDataProvider
‪array getSysDomainCacheDataProvider()
Definition: TypoScriptFrontendControllerTest.php:195
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest
Definition: TypoScriptFrontendControllerTest.php:58
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\headerAndFooterMarkersAreReplacedDuringIntProcessing
‪headerAndFooterMarkersAreReplacedDuringIntProcessing()
Definition: TypoScriptFrontendControllerTest.php:90
‪TYPO3\CMS\Core\Localization\LocalizationFactory
Definition: LocalizationFactory.php:31
‪TYPO3\CMS\Core\Core\SystemEnvironmentBuilder
Definition: SystemEnvironmentBuilder.php:41
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\setUp
‪setUp()
Definition: TypoScriptFrontendControllerTest.php:69
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataBuildsCorrectRegexDataProvider
‪array initializeSearchWordDataBuildsCorrectRegexDataProvider()
Definition: TypoScriptFrontendControllerTest.php:255
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:30
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:53
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataFillsProperRegexpWithArray
‪initializeSearchWordDataFillsProperRegexpWithArray()
Definition: TypoScriptFrontendControllerTest.php:518
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: TypoScriptFrontendControllerTest.php:62
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataBuildsCorrectRegex
‪initializeSearchWordDataBuildsCorrectRegex(array $searchWordGetParameters, bool $enableStandaloneSearchWords, string $expectedRegex)
Definition: TypoScriptFrontendControllerTest.php:294
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\pageRendererLanguageIsSetToSiteLanguageTypo3LanguageInConstructor
‪pageRendererLanguageIsSetToSiteLanguageTypo3LanguageInConstructor()
Definition: TypoScriptFrontendControllerTest.php:569
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\processNonCacheableContentPartsAndSubstituteContentMarkers
‪processNonCacheableContentPartsAndSubstituteContentMarkers()
Definition: TypoScriptFrontendControllerTest.php:106
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\baseUrlWrapHandlesDifferentUrlsDataProvider
‪array baseUrlWrapHandlesDifferentUrlsDataProvider()
Definition: TypoScriptFrontendControllerTest.php:213
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:42
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:26
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\setupTsfeMockForHeaderFooterReplacementCheck
‪MockObject TypoScriptFrontendController setupTsfeMockForHeaderFooterReplacementCheck()
Definition: TypoScriptFrontendControllerTest.php:118
‪TYPO3\CMS\Core\Localization\LanguageStore
Definition: LanguageStore.php:29
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\mountPointParameterContainsOnlyValidMPValues
‪mountPointParameterContainsOnlyValidMPValues()
Definition: TypoScriptFrontendControllerTest.php:652
‪TYPO3\CMS\Core\EventDispatcher\EventDispatcher
Definition: EventDispatcher.php:30
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\$subject
‪MockObject $subject
Definition: TypoScriptFrontendControllerTest.php:67
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\splitLinkVarsDataProvider
‪array splitLinkVarsDataProvider()
Definition: TypoScriptFrontendControllerTest.php:325
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataDoesNothingWithEmptyArrayValue
‪initializeSearchWordDataDoesNothingWithEmptyArrayValue()
Definition: TypoScriptFrontendControllerTest.php:507
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\createSiteWithDefaultLanguage
‪createSiteWithDefaultLanguage(array $languageConfiguration)
Definition: TypoScriptFrontendControllerTest.php:720
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\calculateLinkVarsConsidersCorrectVariables
‪calculateLinkVarsConsidersCorrectVariables(string $linkVars, array $getVars, string $expected)
Definition: TypoScriptFrontendControllerTest.php:436
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataFillsProperRegexpWithArrayAndStandaloneOption
‪initializeSearchWordDataFillsProperRegexpWithArrayAndStandaloneOption()
Definition: TypoScriptFrontendControllerTest.php:529
‪TYPO3\CMS\Core\PageTitle\PageTitleProviderManager
Definition: PageTitleProviderManager.php:31
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\calculateLinkVarsDataProvider
‪calculateLinkVarsDataProvider()
Definition: TypoScriptFrontendControllerTest.php:443
‪TYPO3\CMS\Frontend\Tests\Unit\Controller
Definition: ErrorControllerTest.php:18
‪TYPO3\CMS\Core\Http\ServerRequestFactory
Definition: ServerRequestFactory.php:34
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Core\Http\ServerRequest
Definition: ServerRequest.php:37
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\initializeSearchWordDataDoesNothingWithNullValue
‪initializeSearchWordDataDoesNothingWithNullValue()
Definition: TypoScriptFrontendControllerTest.php:485
‪$args
‪$args
Definition: validateRstFiles.php:214
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\localizationReturnsUnchangedStringIfNotLocallangLabel
‪localizationReturnsUnchangedStringIfNotLocallangLabel()
Definition: TypoScriptFrontendControllerTest.php:162
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\indexedSearchHookUsesPageTitleApi
‪indexedSearchHookUsesPageTitleApi()
Definition: TypoScriptFrontendControllerTest.php:542
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
Definition: FrontendInterface.php:22
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\languageServiceIsSetUpWithSiteLanguageTypo3LanguageInConstructor
‪languageServiceIsSetUpWithSiteLanguageTypo3LanguageInConstructor()
Definition: TypoScriptFrontendControllerTest.php:608
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:128
‪TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
Definition: TypoScriptFrontendController.php:104
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\baseUrlWrapHandlesDifferentUrls
‪baseUrlWrapHandlesDifferentUrls(string $baseUrl, string $url, string $expected)
Definition: TypoScriptFrontendControllerTest.php:246
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication
Definition: FrontendUserAuthentication.php:32
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:53
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\REQUESTTYPE_FE
‪const REQUESTTYPE_FE
Definition: SystemEnvironmentBuilder.php:43
‪TYPO3\CMS\Core\EventDispatcher\ListenerProvider
Definition: ListenerProvider.php:30
‪TYPO3\CMS\Frontend\Tests\Unit\Controller\TypoScriptFrontendControllerTest\splitLinkVarsStringSplitsStringByComma
‪splitLinkVarsStringSplitsStringByComma(string $string, array $expected)
Definition: TypoScriptFrontendControllerTest.php:317
‪TYPO3\CMS\Core\Http\ServerRequestFactory\fromGlobals
‪static ServerRequest fromGlobals()
Definition: ServerRequestFactory.php:59