‪TYPO3CMS  9.5
FrontendLoginControllerTest.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 
18 use Prophecy\Argument;
19 use Prophecy\Prophecy\ObjectProphecy;
20 use Psr\Log\NullLogger;
33 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
34 
38 class ‪FrontendLoginControllerTest extends UnitTestCase
39 {
43  protected ‪$accessibleFixture;
44 
48  protected ‪$testHostName;
49 
53  protected ‪$testSitePath;
54 
58  protected ‪$testTableName;
59 
63  protected ‪$backupEnvironment = true;
64 
68  protected function ‪setUp()
69  {
70  parent::setUp();
71  ‪$GLOBALS['TSFE'] = new \stdClass();
72  $this->testTableName = 'sys_domain';
73  $this->testHostName = 'hostname.tld';
74  $this->testSitePath = '/';
75  $this->accessibleFixture = $this->getAccessibleMock(\‪TYPO3\CMS\Felogin\Controller\FrontendLoginController::class, ['dummy']);
76  $this->accessibleFixture->cObj = $this->createMock(\‪TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
77  $this->accessibleFixture->_set('frontendController', $this->createMock(\‪TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class));
78  $this->accessibleFixture->setLogger(new NullLogger());
79 
80  $mockedSiteFinder = $this->getAccessibleMock(SiteFinder::class, ['getAllSites'], [], '', false, false);
81  $site1 = new ‪Site('dummy', 1, ['base' => 'http://sub.domainhostname.tld/path/']);
82  $site2 = new ‪Site('dummy', 1, ['base' => 'http://sub2.domainhostname.tld/']);
83  $mockedSiteFinder->method('getAllSites')->willReturn([$site1, $site2]);
84 
85  $this->accessibleFixture->_set('siteFinder', $mockedSiteFinder);
86 
88  }
89 
93  protected function ‪tearDown()
94  {
95  // setUpDatabaseMock() prepares some instances via addInstance(), but not all
96  // tests use that instance. purgeInstances() removes left overs
97  GeneralUtility::purgeInstances();
98  GeneralUtility::flushInternalRuntimeCaches();
99  parent::tearDown();
100  }
101 
105  protected function ‪setUpFakeSitePathAndHost()
106  {
107  $_SERVER['ORIG_PATH_INFO'] = $_SERVER['PATH_INFO'] = $_SERVER['ORIG_SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME'] = $this->testSitePath . TYPO3_mainDir . 'index.php';
108  $_SERVER['HTTP_HOST'] = ‪$this->testHostName;
109 
112  true,
113  false,
118  ‪Environment::getBackendPath() . '/index.php',
119  ‪Environment::isWindows() ? 'WINDOWS' : 'UNIX'
120  );
121  }
122 
126  protected function ‪setUpDatabaseMock()
127  {
129  $connection = $this->prophesize(Connection::class);
130  $connection->getDatabasePlatform()->willReturn(new ‪MockPlatform());
131  $connection->getExpressionBuilder()->willReturn(new ‪ExpressionBuilder($connection->reveal()));
132  $connection->quoteIdentifier(Argument::cetera())->willReturnArgument(0);
133 
134  // TODO: This should rather be a functional test if we need a query builder
135  // or we should clean up the code itself to not need to mock internal behavior here
136  $queryBuilder = new ‪QueryBuilder(
137  $connection->reveal(),
138  null,
139  new \Doctrine\DBAL\Query\‪QueryBuilder($connection->reveal())
140  );
141 
143  $resultSet = $this->prophesize(\Doctrine\DBAL\Driver\Statement::class);
144  $resultSet->fetchAll()->willReturn([
145  ['domainName' => 'domainhostname.tld'],
146  ['domainName' => 'otherhostname.tld/path'],
147  ['domainName' => 'sub.domainhostname.tld/path/']
148  ]);
149 
151  $connectionPool = $this->prophesize(ConnectionPool::class);
152  $connectionPool->getQueryBuilderForTable('sys_domain')->willReturn($queryBuilder);
153  GeneralUtility::addInstance(ConnectionPool::class, $connectionPool->reveal());
154 
155  $connection->executeQuery('SELECT domainName FROM sys_domain', Argument::cetera())
156  ->willReturn($resultSet->reveal());
157  }
158 
162  public function ‪typo3SitePathEqualsStubSitePath()
163  {
164  $this->assertEquals(\‪TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), $this->testSitePath);
165  }
166 
170  public function ‪typo3SiteUrlEqualsStubSiteUrl()
171  {
172  $this->assertEquals(\‪TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), ('http://' . $this->testHostName) . $this->testSitePath);
173  }
174 
179  {
180  $this->testHostName = 'somenewhostname.com';
181  $this->testSitePath = '/somenewpath/';
183  $this->assertEquals(\‪TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), $this->testSitePath);
184  }
185 
190  {
191  $this->testHostName = 'somenewhostname.com';
192  $this->testSitePath = '/somenewpath/';
194  $this->assertEquals(\‪TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), ('http://' . $this->testHostName) . $this->testSitePath);
195  }
196 
203  {
204  return [
205  'absolute URL, hostname not in sys_domain, trailing slash' => ['http://badhost.tld/'],
206  'absolute URL, hostname not in sys_domain, no trailing slash' => ['http://badhost.tld'],
207  'absolute URL, subdomain in sys_domain, but main domain not, trailing slash' => ['http://domainhostname.tld.badhost.tld/'],
208  'absolute URL, subdomain in sys_domain, but main domain not, no trailing slash' => ['http://domainhostname.tld.badhost.tld'],
209  'non http absolute URL 1' => ['its://domainhostname.tld/itunes/'],
210  'non http absolute URL 2' => ['ftp://domainhostname.tld/download/'],
211  'XSS attempt 1' => ['javascript:alert(123)'],
212  'XSS attempt 2' => ['" onmouseover="alert(123)"'],
213  'invalid URL, HTML break out attempt' => ['" >blabuubb'],
214  'invalid URL, UNC path' => ['\\\\foo\\bar\\'],
215  'invalid URL, backslashes in path' => ['http://domainhostname.tld\\bla\\blupp'],
216  'invalid URL, linefeed in path' => ['http://domainhostname.tld/bla/blupp' . LF],
217  'invalid URL, only one slash after scheme' => ['http:/domainhostname.tld/bla/blupp'],
218  'invalid URL, illegal chars' => ['http://(<>domainhostname).tld/bla/blupp'],
219  ];
220  }
221 
227  public function ‪validateRedirectUrlClearsUrl($url)
228  {
229  $this->‪setUpDatabaseMock();
230  $this->assertEquals('', $this->accessibleFixture->_call('validateRedirectUrl', $url));
231  }
232 
239  {
240  return [
241  'sane absolute URL' => ['http://domainhostname.tld/'],
242  'sane absolute URL with script' => ['http://domainhostname.tld/index.php?id=1'],
243  'sane absolute URL with realurl' => ['http://domainhostname.tld/foo/bar/foo.html'],
244  'sane absolute URL with homedir' => ['http://domainhostname.tld/~user/'],
245  'sane absolute URL with some strange chars encoded' => ['http://domainhostname.tld/~user/a%cc%88o%cc%88%c3%9fa%cc%82/foo.html'],
246  'sane absolute URL (domain record with path)' => ['http://otherhostname.tld/path/'],
247  'sane absolute URL with script (domain record with path)' => ['http://otherhostname.tld/path/index.php?id=1'],
248  'sane absolute URL with realurl (domain record with path)' => ['http://otherhostname.tld/path/foo/bar/foo.html'],
249  'sane absolute URL (domain record with path and slash)' => ['http://sub.domainhostname.tld/path/'],
250  'sane absolute URL with script (domain record with path slash)' => ['http://sub.domainhostname.tld/path/index.php?id=1'],
251  'sane absolute URL with realurl (domain record with path slash)' => ['http://sub.domainhostname.tld/path/foo/bar/foo.html'],
252  'relative URL, no leading slash 1' => ['index.php?id=1'],
253  'relative URL, no leading slash 2' => ['foo/bar/index.php?id=2'],
254  'relative URL, leading slash, no realurl' => ['/index.php?id=1'],
255  'relative URL, leading slash, realurl' => ['/de/service/imprint.html'],
256  ];
257  }
258 
264  public function ‪validateRedirectUrlKeepsCleanUrl($url)
265  {
266  $this->‪setUpDatabaseMock();
267  $this->assertEquals($url, $this->accessibleFixture->_call('validateRedirectUrl', $url));
268  }
269 
276  {
277  return [
278  'absolute URL, missing subdirectory' => ['http://hostname.tld/'],
279  'absolute URL, wrong subdirectory' => ['http://hostname.tld/hacker/index.php'],
280  'absolute URL, correct subdirectory, no trailing slash' => ['http://hostname.tld/subdir'],
281  'absolute URL, correct subdirectory of sys_domain record, no trailing slash' => ['http://otherhostname.tld/path'],
282  'absolute URL, correct subdirectory of sys_domain record, no trailing slash, subdomain' => ['http://sub3.domainhostname.tld/path'],
283  'relative URL, leading slash, no path' => ['/index.php?id=1'],
284  'relative URL, leading slash, wrong path' => ['/de/sub/site.html'],
285  'relative URL, leading slash, slash only' => ['/'],
286  ];
287  }
288 
295  {
296  $this->testSitePath = '/subdir/';
298  $this->‪setUpDatabaseMock();
299  $this->assertEquals('', $this->accessibleFixture->_call('validateRedirectUrl', $url));
300  }
301 
308  {
309  return [
310  'absolute URL, correct subdirectory' => ['http://hostname.tld/subdir/'],
311  'absolute URL, correct subdirectory, realurl' => ['http://hostname.tld/subdir/de/imprint.html'],
312  'absolute URL, correct subdirectory, no realurl' => ['http://hostname.tld/subdir/index.php?id=10'],
313  'absolute URL, correct subdirectory of sys_domain record' => ['http://otherhostname.tld/path/'],
314  'absolute URL, correct subdirectory of sys_domain record, subdomain' => ['http://sub.domainhostname.tld/path/'],
315  'relative URL, no leading slash, realurl' => ['de/service/imprint.html'],
316  'relative URL, no leading slash, no realurl' => ['index.php?id=1'],
317  'relative nested URL, no leading slash, no realurl' => ['foo/bar/index.php?id=2']
318  ];
319  }
320 
327  {
328  $this->testSitePath = '/subdir/';
330  $this->‪setUpDatabaseMock();
331  $this->assertEquals($url, $this->accessibleFixture->_call('validateRedirectUrl', $url));
332  }
333 
334  /*************************
335  * Test concerning getPreverveGetVars
336  *************************/
337 
342  {
343  return [
344  'special get var id is not preserved' => [
345  [
346  'id' => 42,
347  ],
348  '',
349  [],
350  ],
351  'simple additional parameter is not preserved if not specified in preservedGETvars' => [
352  [
353  'id' => 42,
354  'special' => 23,
355  ],
356  '',
357  [],
358  ],
359  'all params except ignored ones are preserved if preservedGETvars is set to "all"' => [
360  [
361  'id' => 42,
362  'special1' => 23,
363  'special2' => [
364  'foo' => 'bar',
365  ],
366  'tx_felogin_pi1' => [
367  'forgot' => 1,
368  ],
369  ],
370  'all',
371  [
372  'special1' => 23,
373  'special2' => [
374  'foo' => 'bar',
375  ],
376  ]
377  ],
378  'preserve single parameter' => [
379  [
380  'L' => 42,
381  ],
382  'L',
383  [
384  'L' => 42,
385  ],
386  ],
387  'preserve whole parameter array' => [
388  [
389  'L' => 3,
390  'tx_someext' => [
391  'foo' => 'simple',
392  'bar' => [
393  'baz' => 'simple',
394  ],
395  ],
396  ],
397  'L,tx_someext',
398  [
399  'L' => 3,
400  'tx_someext' => [
401  'foo' => 'simple',
402  'bar' => [
403  'baz' => 'simple',
404  ],
405  ],
406  ],
407  ],
408  'preserve part of sub array' => [
409  [
410  'L' => 3,
411  'tx_someext' => [
412  'foo' => 'simple',
413  'bar' => [
414  'baz' => 'simple',
415  ],
416  ],
417  ],
418  'L,tx_someext[bar]',
419  [
420  'L' => 3,
421  'tx_someext' => [
422  'bar' => [
423  'baz' => 'simple',
424  ],
425  ],
426  ],
427  ],
428  'preserve keys on different levels' => [
429  [
430  'L' => 3,
431  'no-preserve' => 'whatever',
432  'tx_ext2' => [
433  'foo' => 'simple',
434  ],
435  'tx_ext3' => [
436  'bar' => [
437  'baz' => 'simple',
438  ],
439  'go-away' => '',
440  ],
441  ],
442  'L,tx_ext2,tx_ext3[bar]',
443  [
444  'L' => 3,
445  'tx_ext2' => [
446  'foo' => 'simple',
447  ],
448  'tx_ext3' => [
449  'bar' => [
450  'baz' => 'simple',
451  ],
452  ],
453  ],
454  ],
455  'preserved value that does not exist in get' => [
456  [],
457  'L,foo%5Bbar%5D',
458  [],
459  ],
460  ];
461  }
462 
470  public function ‪getPreserveGetVarsReturnsCorrectResult(array $getArray, $preserveVars, $expected)
471  {
472  $_GET = $getArray;
473  $this->accessibleFixture->conf['preserveGETvars'] = $preserveVars;
474  $this->assertSame($expected, $this->accessibleFixture->_call('getPreserveGetVars'));
475  }
476 
477  /**************************************************
478  * Tests concerning isInCurrentDomain
479  **************************************************/
480 
487  {
488  return [
489  'url https, current host http' => [
490  'example.com', // HTTP_HOST
491  '0', // HTTPS
492  'https://example.com/foo.html' // URL
493  ],
494  'url http, current host https' => [
495  'example.com',
496  '1',
497  'http://example.com/foo.html'
498  ],
499  'url https, current host https' => [
500  'example.com',
501  '1',
502  'https://example.com/foo.html'
503  ],
504  'url http, current host http' => [
505  'example.com',
506  '0',
507  'http://example.com/foo.html'
508  ]
509  ];
510  }
511 
519  public function ‪isInCurrentDomainIgnoresScheme($host, $https, $url)
520  {
521  $_SERVER['HTTP_HOST'] = $host;
522  $_SERVER['HTTPS'] = $https;
523  $this->assertTrue($this->accessibleFixture->_call('isInCurrentDomain', $url));
524  }
525 
530  {
531  return [
532  'simple difference' => [
533  'example.com', // HTTP_HOST
534  'http://typo3.org/foo.html' // URL
535  ],
536  'subdomain different' => [
537  'example.com',
538  'http://foo.example.com/bar.html'
539  ]
540  ];
541  }
542 
549  public function ‪isInCurrentDomainReturnsFalseIfDomainsAreDifferent($host, $url)
550  {
551  $_SERVER['HTTP_HOST'] = $host;
552  $this->assertFalse($this->accessibleFixture->_call('isInCurrentDomain', $url));
553  }
554 
559  {
560  $conf = [
561  'redirectMode' => 'refererDomains',
562  'domains' => 'example.com'
563  ];
564 
565  $this->accessibleFixture->_set('conf', $conf);
566  $this->accessibleFixture->_set('logintype', ‪LoginType::LOGIN);
567  $this->accessibleFixture->_set('referer', 'http://www.example.com/snafu');
569  $tsfe = $this->accessibleFixture->_get('frontendController');
570  $this->accessibleFixture->_set('userIsLoggedIn', true);
571  $this->assertSame(['http://www.example.com/snafu'], $this->accessibleFixture->_call('processRedirect'));
572  }
573 
578  {
579  return [
580  'Simple casing' => [
581  [
582  'username' => 'Holy',
583  'lastname' => 'Wood',
584  ],
585  [
586  'username.' => [
587  'case' => 'upper'
588  ]
589  ],
590  [
591  '###FEUSER_USERNAME###' => 'HOLY',
592  '###FEUSER_LASTNAME###' => 'Wood',
593  '###USER###' => 'HOLY'
594  ]
595  ],
596  'Default config applies' => [
597  [
598  'username' => 'Holy',
599  'lastname' => 'O" Mally',
600  ],
601  [
602  'username.' => [
603  'case' => 'upper'
604  ]
605  ],
606  [
607  '###FEUSER_USERNAME###' => 'HOLY',
608  '###FEUSER_LASTNAME###' => 'O&quot; Mally',
609  '###USER###' => 'HOLY'
610  ]
611  ],
612  'Specific config overrides default config' => [
613  [
614  'username' => 'Holy',
615  'lastname' => 'O" Mally',
616  ],
617  [
618  'username.' => [
619  'case' => 'upper'
620  ],
621  'lastname.' => [
622  'htmlSpecialChars' => '0'
623  ]
624  ],
625  [
626  '###FEUSER_USERNAME###' => 'HOLY',
627  '###FEUSER_LASTNAME###' => 'O" Mally',
628  '###USER###' => 'HOLY'
629  ]
630  ],
631  'No given user returns empty array' => [
632  null,
633  [
634  'username.' => [
635  'case' => 'upper'
636  ],
637  'lastname.' => [
638  'htmlSpecialChars' => '0'
639  ]
640  ],
641  []
642  ],
643  ];
644  }
645 
650  public function ‪processUserFieldsRespectsDefaultConfigurationForStdWrap($userRecord, $fieldConf, $expectedMarkers)
651  {
652  $tsfe = new \stdClass();
653  $tsfe->fe_user = new \stdClass();
654  $tsfe->fe_user->user = $userRecord;
655  $conf = ['userfields.' => $fieldConf];
656  $this->accessibleFixture->_set('cObj', new ‪ContentObjectRenderer());
657  $this->accessibleFixture->_set('frontendController', $tsfe);
658  $this->accessibleFixture->_set('conf', $conf);
659  $actualResult = $this->accessibleFixture->_call('getUserFieldMarkers');
660  $this->assertEquals($expectedMarkers, $actualResult);
661  }
662 
663  /**************************************************
664  * Tests concerning isInLocalDomain
665  **************************************************/
666 
670  public function ‪isInLocalDomainValidatesSites()
671  {
672  $this->‪setUpDatabaseMock();
673 
674  $url = 'http://example.com';
675  self::assertFalse($this->accessibleFixture->_call('isInLocalDomain', $url));
676 
677  $url = 'http://sub2.domainhostname.tld/some/path';
678  self::assertTrue($this->accessibleFixture->_call('isInLocalDomain', $url));
679  }
680 }
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUp
‪setUp()
Definition: FrontendLoginControllerTest.php:63
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder
Definition: ExpressionBuilder.php:33
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\processUserFieldsRespectsDefaultConfigurationForStdWrapDataProvider
‪processUserFieldsRespectsDefaultConfigurationForStdWrapDataProvider()
Definition: FrontendLoginControllerTest.php:572
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider
‪array validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider()
Definition: FrontendLoginControllerTest.php:302
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:153
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlKeepsCleanUrlDataProvider
‪array validateRedirectUrlKeepsCleanUrlDataProvider()
Definition: FrontendLoginControllerTest.php:233
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\typo3SiteUrlEqualsStubSiteUrlAfterChangingInTest
‪typo3SiteUrlEqualsStubSiteUrlAfterChangingInTest()
Definition: FrontendLoginControllerTest.php:184
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\tearDown
‪tearDown()
Definition: FrontendLoginControllerTest.php:88
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\typo3SitePathEqualsStubSitePath
‪typo3SitePathEqualsStubSitePath()
Definition: FrontendLoginControllerTest.php:157
‪TYPO3
‪TYPO3\CMS\Core\Core\Environment\isWindows
‪static bool isWindows()
Definition: Environment.php:266
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\$testHostName
‪string $testHostName
Definition: FrontendLoginControllerTest.php:46
‪TYPO3\CMS\Core\Site\SiteFinder
Definition: SiteFinder.php:31
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlClearsInvalidUrlInSubdirectory
‪validateRedirectUrlClearsInvalidUrlInSubdirectory($url)
Definition: FrontendLoginControllerTest.php:289
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\$testTableName
‪string $testTableName
Definition: FrontendLoginControllerTest.php:54
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\isInCurrentDomainIgnoresScheme
‪isInCurrentDomainIgnoresScheme($host, $https, $url)
Definition: FrontendLoginControllerTest.php:514
‪TYPO3\CMS\Core\Authentication\LoginType
Definition: LoginType.php:25
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\isInCurrentDomainIgnoresSchemeDataProvider
‪array isInCurrentDomainIgnoresSchemeDataProvider()
Definition: FrontendLoginControllerTest.php:481
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlClearsUrlDataProvider
‪array validateRedirectUrlClearsUrlDataProvider()
Definition: FrontendLoginControllerTest.php:197
‪TYPO3\CMS\Core\Core\Environment\getContext
‪static ApplicationContext getContext()
Definition: Environment.php:106
‪TYPO3\CMS\Core\Database\Query\QueryBuilder
Definition: QueryBuilder.php:47
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:39
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\processUserFieldsRespectsDefaultConfigurationForStdWrap
‪processUserFieldsRespectsDefaultConfigurationForStdWrap($userRecord, $fieldConf, $expectedMarkers)
Definition: FrontendLoginControllerTest.php:645
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlKeepsCleanUrl
‪validateRedirectUrlKeepsCleanUrl($url)
Definition: FrontendLoginControllerTest.php:259
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\$backupEnvironment
‪bool $backupEnvironment
Definition: FrontendLoginControllerTest.php:58
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\processRedirectReferrerDomainsMatchesDomains
‪processRedirectReferrerDomainsMatchesDomains()
Definition: FrontendLoginControllerTest.php:553
‪TYPO3\CMS\Core\Core\Environment\getProjectPath
‪static string getProjectPath()
Definition: Environment.php:142
‪TYPO3\CMS\Felogin\Tests\Unit\Controller
Definition: FrontendLoginControllerTest.php:3
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\getPreserveGetVarsReturnsCorrectResult
‪getPreserveGetVarsReturnsCorrectResult(array $getArray, $preserveVars, $expected)
Definition: FrontendLoginControllerTest.php:465
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\$accessibleFixture
‪TYPO3 CMS Felogin Controller FrontendLoginController TYPO3 TestingFramework Core AccessibleObjectInterface $accessibleFixture
Definition: FrontendLoginControllerTest.php:42
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform
Definition: MockPlatform.php:21
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\isInCurrentDomainReturnsFalseIfDomainsAreDifferent
‪isInCurrentDomainReturnsFalseIfDomainsAreDifferent($host, $url)
Definition: FrontendLoginControllerTest.php:544
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\isInLocalDomainValidatesSites
‪isInLocalDomainValidatesSites()
Definition: FrontendLoginControllerTest.php:665
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\getPreserveGetVarsReturnsCorrectResultDataProvider
‪array getPreserveGetVarsReturnsCorrectResultDataProvider()
Definition: FrontendLoginControllerTest.php:336
‪TYPO3\CMS\Core\Core\Environment\initialize
‪static initialize(ApplicationContext $context, bool $cli, bool $composerMode, string $projectPath, string $publicPath, string $varPath, string $configPath, string $currentScript, string $os)
Definition: Environment.php:77
‪TYPO3\CMS\Core\Core\Environment\getBackendPath
‪static string getBackendPath()
Definition: Environment.php:223
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpDatabaseMock
‪setUpDatabaseMock()
Definition: FrontendLoginControllerTest.php:121
‪TYPO3\CMS\Core\Authentication\LoginType\LOGIN
‪const LOGIN
Definition: LoginType.php:29
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:31
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlClearsUrl
‪validateRedirectUrlClearsUrl($url)
Definition: FrontendLoginControllerTest.php:222
‪TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
Definition: TypoScriptFrontendController.php:97
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:39
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider
‪array validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider()
Definition: FrontendLoginControllerTest.php:270
‪TYPO3\CMS\Core\Core\Environment\getConfigPath
‪static string getConfigPath()
Definition: Environment.php:183
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
Definition: ContentObjectRenderer.php:91
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest
Definition: FrontendLoginControllerTest.php:39
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\typo3SitePathEqualsStubSitePathAfterChangingInTest
‪typo3SitePathEqualsStubSitePathAfterChangingInTest()
Definition: FrontendLoginControllerTest.php:173
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\typo3SiteUrlEqualsStubSiteUrl
‪typo3SiteUrlEqualsStubSiteUrl()
Definition: FrontendLoginControllerTest.php:165
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\validateRedirectUrlKeepsCleanUrlInSubdirectory
‪validateRedirectUrlKeepsCleanUrlInSubdirectory($url)
Definition: FrontendLoginControllerTest.php:321
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost
‪setUpFakeSitePathAndHost()
Definition: FrontendLoginControllerTest.php:100
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\isInCurrentDomainReturnsFalseIfDomainsAreDifferentDataProvider
‪array isInCurrentDomainReturnsFalseIfDomainsAreDifferentDataProvider()
Definition: FrontendLoginControllerTest.php:524
‪TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\$testSitePath
‪string $testSitePath
Definition: FrontendLoginControllerTest.php:50
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static string getVarPath()
Definition: Environment.php:165