‪TYPO3CMS  9.5
RedirectServiceTest.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\LoggerInterface;
31 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 
33 class ‪RedirectServiceTest extends UnitTestCase
34 {
38  protected ‪$resetSingletonInstances = true;
39 
44 
48  protected ‪$linkServiceProphecy;
49 
53  protected ‪$redirectService;
54 
55  protected function ‪setUp()
56  {
57  parent::setUp();
58  $loggerProphecy = $this->prophesize(LoggerInterface::class);
59  $this->redirectCacheServiceProphecy = $this->prophesize(RedirectCacheService::class);
60  $this->linkServiceProphecy = $this->prophesize(LinkService::class);
61  $this->redirectService = new ‪RedirectService();
62  $this->redirectService->setLogger($loggerProphecy->reveal());
63 
64  ‪$GLOBALS['SIM_ACCESS_TIME'] = 42;
65  }
66 
71  {
72  $this->redirectCacheServiceProphecy->getRedirects()->willReturn([]);
73  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
74 
75  $result = $this->redirectService->matchRedirect('example.com', 'foo');
76 
77  self::assertNull($result);
78  }
79 
85  public function ‪matchRedirectReturnsRedirectOnFlatMatch(string $path = '')
86  {
87  $row = [
88  'target' => 'https://example.com',
89  'force_https' => '0',
90  'keep_query_parameters' => '0',
91  'target_statuscode' => '307',
92  'disabled' => '0',
93  'starttime' => '0',
94  'endtime' => '0'
95  ];
96  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
97  [
98  'example.com' => [
99  'flat' => [
100  $path . '/' => [
101  1 => $row,
102  ],
103  ],
104  ],
105  ]
106  );
107  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
108 
109  $result = $this->redirectService->matchRedirect('example.com', rawurlencode($path));
110 
111  self::assertSame($row, $result);
112  }
113 
118  {
119  return [
120  'default case' => [
121  'foo'
122  ],
123  'umlauts' => [
124  'äöü'
125  ],
126  'various special chars' => [
127  'special-chars-«-∑-€-®-†-Ω-¨-ø-π-å-‚-∂-ƒ-©-ª-º-∆-@-¥-≈-ç-√-∫-~-µ-∞-…-–'
128  ],
129  'chinese' => [
130  '应用'
131  ],
132  'hindi' => [
133  'कंपनी'
134  ],
135  ];
136  }
137 
142  {
143  $row = [
144  'target' => 'https://example.com',
145  'force_https' => '0',
146  'keep_query_parameters' => '0',
147  'respect_query_parameters' => '1',
148  'target_statuscode' => '307',
149  'disabled' => '0',
150  'starttime' => '0',
151  'endtime' => '0'
152  ];
153  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
154  [
155  'example.com' => [
156  'respect_query_parameters' => [
157  'index.php?id=123' => [
158  1 => $row,
159  ],
160  ],
161  ],
162  ]
163  );
164  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
165 
166  $result = $this->redirectService->matchRedirect('example.com', 'index.php', 'id=123');
167 
168  self::assertSame($row, $result);
169  }
170 
175  {
176  $row = [
177  'target' => 'https://example.com',
178  'force_https' => '0',
179  'keep_query_parameters' => '0',
180  'respect_query_parameters' => '1',
181  'target_statuscode' => '307',
182  'disabled' => '0',
183  'starttime' => '0',
184  'endtime' => '0'
185  ];
186  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
187  [
188  'example.com' => [
189  'respect_query_parameters' => [
190  'index.php/?id=123' => [
191  1 => $row,
192  ],
193  ],
194  ],
195  ]
196  );
197  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
198 
199  $result = $this->redirectService->matchRedirect('example.com', 'index.php', 'id=123');
200 
201  self::assertSame($row, $result);
202  }
203 
208  {
209  $row = [
210  'target' => 'https://example.com/target',
211  'force_https' => '0',
212  'keep_query_parameters' => '0',
213  'respect_query_parameters' => '1',
214  'target_statuscode' => '307',
215  'disabled' => '0',
216  'starttime' => '0',
217  'endtime' => '0'
218  ];
219  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
220  [
221  'example.com' => [
222  'respect_query_parameters' => [
223  'index.php?id=123&a=b' => [
224  1 => $row,
225  ],
226  ],
227  ],
228  ]
229  );
230  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
231 
232  $result = $this->redirectService->matchRedirect('example.com', 'index.php', 'id=123&a=b');
233 
234  self::assertSame($row, $result);
235  }
236 
241  {
242  $row = [
243  'target' => 'https://example.com/target',
244  'force_https' => '0',
245  'keep_query_parameters' => '0',
246  'respect_query_parameters' => '1',
247  'target_statuscode' => '307',
248  'disabled' => '0',
249  'starttime' => '0',
250  'endtime' => '0'
251  ];
252  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
253  [
254  'example.com' => [
255  'respect_query_parameters' => [
256  'index.php?id=123&a=b' => [
257  1 => $row,
258  ],
259  ],
260  ],
261  ]
262  );
263  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
264 
265  $result = $this->redirectService->matchRedirect('example.com', 'index.php', 'id=123&a=a');
266 
267  self::assertSame(null, $result);
268  }
269 
274  {
275  $row1 = [
276  'target' => 'https://example.com/no-promotion',
277  'force_https' => '0',
278  'keep_query_parameters' => '0',
279  'respect_query_parameters' => '0',
280  'target_statuscode' => '307',
281  'disabled' => '0',
282  'starttime' => '0',
283  'endtime' => '0'
284  ];
285  $row2 = [
286  'target' => 'https://example.com/promotion',
287  'force_https' => '0',
288  'keep_query_parameters' => '0',
289  'respect_query_parameters' => '1',
290  'target_statuscode' => '307',
291  'disabled' => '0',
292  'starttime' => '0',
293  'endtime' => '0'
294  ];
295  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
296  [
297  'example.com' => [
298  'flat' => [
299  'special/page/' =>
300  [
301  1 => $row1,
302  ]
303  ],
304  'respect_query_parameters' => [
305  'special/page?key=998877' => [
306  1 => $row2,
307  ],
308  ],
309  ],
310  ]
311  );
312  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
313 
314  $result = $this->redirectService->matchRedirect('example.com', 'special/page', 'key=998877');
315 
316  self::assertSame($row2, $result);
317  }
318 
323  {
324  $row1 = [
325  'target' => 'https://example.com',
326  'force_https' => '0',
327  'keep_query_parameters' => '0',
328  'target_statuscode' => '307',
329  'disabled' => '0',
330  'starttime' => '0',
331  'endtime' => '0'
332  ];
333  $row2 = [
334  'target' => 'https://example.net',
335  'force_https' => '0',
336  'keep_query_parameters' => '0',
337  'target_statuscode' => '307',
338  'disabled' => '0',
339  'starttime' => '0',
340  'endtime' => '0'
341  ];
342  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
343  [
344  'example.com' => [
345  'flat' => [
346  'foo/' => [
347  1 => $row1,
348  ],
349  ],
350  ],
351  '*' => [
352  'flat' => [
353  'foo/' => [
354  2 => $row2,
355  ],
356  ],
357  ],
358  ]
359  );
360  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
361 
362  $result = $this->redirectService->matchRedirect('example.com', 'foo');
363 
364  self::assertSame($row1, $result);
365  }
366 
371  {
372  $row = [
373  'target' => 'https://example.com',
374  'force_https' => '0',
375  'keep_query_parameters' => '0',
376  'target_statuscode' => '307',
377  'disabled' => '0',
378  'starttime' => '0',
379  'endtime' => '0'
380  ];
381  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
382  [
383  'example.com' => [
384  'regexp' => [
385  '/f.*?/' => [
386  1 => $row,
387  ],
388  ],
389  ],
390  ]
391  );
392  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
393 
394  $result = $this->redirectService->matchRedirect('example.com', 'foo');
395 
396  self::assertSame($row, $result);
397  }
398 
403  {
404  $row1 = [
405  'target' => 'https://example.com',
406  'force_https' => '0',
407  'keep_query_parameters' => '0',
408  'target_statuscode' => '307',
409  'starttime' => '0',
410  'endtime' => '0',
411  'disabled' => '1'
412  ];
413  $row2 = [
414  'target' => 'https://example.net',
415  'force_https' => '0',
416  'keep_query_parameters' => '0',
417  'target_statuscode' => '307',
418  'starttime' => '0',
419  'endtime' => '0',
420  'disabled' => '0'
421  ];
422  $this->redirectCacheServiceProphecy->getRedirects()->willReturn(
423  [
424  'example.com' => [
425  'flat' => [
426  'foo/' => [
427  1 => $row1,
428  2 => $row2
429  ],
430  ],
431  ],
432  ]
433  );
434  GeneralUtility::addInstance(RedirectCacheService::class, $this->redirectCacheServiceProphecy->reveal());
435 
436  $result = $this->redirectService->matchRedirect('example.com', 'foo');
437 
438  self::assertSame($row2, $result);
439  }
440 
445  {
446  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
447  ‪$linkServiceProphecy->‪resolve(Argument::any())->willThrow(new ‪InvalidPathException('', 1516531195));
448  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
449 
450  $result = $this->redirectService->getTargetUrl(['target' => 'invalid'], [], new ‪Uri(), new ‪Site('dummy', 13, []));
451 
452  self::assertNull($result);
453  }
454 
458  public function ‪getTargetUrlReturnsUrlForTypeUrl()
459  {
460  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
461  $redirectTargetMatch = [
462  'target' => 'https://example.com',
463  'force_https' => '0',
464  'keep_query_parameters' => '0'
465  ];
466  $linkDetails = [
467  'type' => ‪LinkService::TYPE_URL,
468  'url' => 'https://example.com/'
469  ];
470  ‪$linkServiceProphecy->‪resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
471  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
472 
473  $source = new ‪Uri('https://example.com');
474  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, [], $source, new ‪Site('dummy', 13, []));
475 
476  $uri = new ‪Uri('https://example.com/');
477  self::assertEquals($uri, $result);
478  }
479 
483  public function ‪getTargetUrlReturnsUrlForTypeFile()
484  {
485  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
486  $fileProphecy = $this->prophesize(File::class);
487  $fileProphecy->getPublicUrl()->willReturn('https://example.com/file.txt');
488  $redirectTargetMatch = [
489  'target' => 'https://example.com',
490  'force_https' => '0',
491  'keep_query_parameters' => '0',
492  ];
493  $linkDetails = [
494  'type' => ‪LinkService::TYPE_FILE,
495  'file' => $fileProphecy->reveal()
496  ];
497  ‪$linkServiceProphecy->‪resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
498  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
499 
500  $source = new ‪Uri('https://example.com');
501  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, [], $source, new ‪Site('dummy', 13, []));
502 
503  $uri = new ‪Uri('https://example.com/file.txt');
504  self::assertEquals($uri, $result);
505  }
506 
511  {
512  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
513  $folderProphecy = $this->prophesize(Folder::class);
514  $folderProphecy->getPublicUrl()->willReturn('https://example.com/folder/');
515  $redirectTargetMatch = [
516  'target' => 'https://example.com',
517  'force_https' => '0',
518  'keep_query_parameters' => '0',
519  ];
520  $folder = $folderProphecy->reveal();
521  $linkDetails = [
522  'type' => ‪LinkService::TYPE_FOLDER,
523  'folder' => $folder
524  ];
525  ‪$linkServiceProphecy->‪resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
526  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
527 
528  $source = new ‪Uri('https://example.com/');
529  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, [], $source, new ‪Site('dummy', 13, []));
530 
531  $uri = new ‪Uri('https://example.com/folder/');
532  self::assertEquals($uri, $result);
533  }
534 
538  public function ‪getTargetUrlRespectsForceHttps()
539  {
540  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
541  $redirectTargetMatch = [
542  'target' => 'https://example.com',
543  'keep_query_parameters' => '0',
544  'force_https' => '1',
545  ];
546  $linkDetails = [
547  'type' => ‪LinkService::TYPE_URL,
548  'url' => 'http://example.com'
549  ];
550  ‪$linkServiceProphecy->‪resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
551  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
552 
553  $source = new ‪Uri('https://example.com');
554  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, [], $source, new ‪Site('dummy', 13, []));
555 
556  $uri = new ‪Uri('https://example.com');
557  self::assertEquals($uri, $result);
558  }
559 
564  {
565  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
566  $redirectTargetMatch = [
567  'target' => 'https://example.com',
568  'force_https' => '0',
569  'keep_query_parameters' => '1'
570  ];
571  $linkDetails = [
572  'type' => ‪LinkService::TYPE_URL,
573  'url' => 'https://example.com/?foo=1&bar=2'
574  ];
575  ‪$linkServiceProphecy->‪resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
576  GeneralUtility::setSingletonInstance(LinkService::class, ‪$linkServiceProphecy->reveal());
577 
578  $source = new ‪Uri('https://example.com/?bar=2&baz=4&foo=1');
579  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, ['bar' => 3, 'baz' => 4], $source, new ‪Site('dummy', 13, []));
580 
581  $uri = new ‪Uri('https://example.com/?bar=2&baz=4&foo=1');
582  self::assertEquals($uri, $result);
583  }
584 
589  {
590  ‪$linkServiceProphecy = $this->prophesize(LinkService::class);
591  $siteFinder = $this->prophesize(SiteFinder::class);
593  ‪$redirectService = $this->getAccessibleMock(
594  RedirectService::class,
595  ['getUriFromCustomLinkDetails']
596  );
597 
598  $loggerProphecy = $this->prophesize(LoggerInterface::class);
599  ‪$redirectService->setLogger($loggerProphecy->reveal());
600 
601  $pageRecord = 't3://page?uid=13';
602  $redirectTargetMatch = [
603  'target' => $pageRecord . ' - - - foo=bar',
604  'force_https' => 1,
605  'keep_query_parameters' => 1
606  ];
607 
608  $linkDetails = [
609  'pageuid' => 13,
610  'type' => ‪LinkService::TYPE_PAGE
611  ];
612  ‪$linkServiceProphecy->‪resolve($pageRecord)->willReturn($linkDetails);
613 
614  $queryParams['foo'] = 'bar';
615  $uri = new ‪Uri('/page?foo=bar');
616 
617  $site = new ‪Site('dummy', 13, []);
618  ‪$redirectService->expects($this->once())->method('getUriFromCustomLinkDetails')
619  ->with($redirectTargetMatch, $site, $linkDetails, $queryParams)
620  ->willReturn($uri);
621  $result = ‪$redirectService->‪getTargetUrl($redirectTargetMatch, [], $uri, $site);
622 
623  self::assertEquals($uri, $result);
624  }
625 
630  {
631  $redirectTargetMatch = [
632  'source_path' => '#^/foo/(.*)#',
633  'target' => 'https://anotherdomain.com/$1',
634  'force_https' => '0',
635  'keep_query_parameters' => '1',
636  'is_regexp' => 1
637  ];
638  $linkDetails = [
639  'type' => ‪LinkService::TYPE_URL,
640  'url' => 'https://anotherdomain.com/$1'
641  ];
642  $this->linkServiceProphecy->resolve($redirectTargetMatch['target'])->willReturn($linkDetails);
643 
644  $source = new ‪Uri('https://example.com/foo/bar');
645  $result = $this->redirectService->getTargetUrl($redirectTargetMatch, [], $source, new ‪Site('dummy', 13, []));
646 
647  $uri = new ‪Uri('https://anotherdomain.com/bar');
648  self::assertEquals($uri, $result);
649  }
650 }
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlReplaceRegExpCaptureGroup
‪getTargetUrlReplaceRegExpCaptureGroup()
Definition: RedirectServiceTest.php:625
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest
Definition: RedirectServiceTest.php:34
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsNullIfNoRedirectsExist
‪matchRedirectReturnsNullIfNoRedirectsExist()
Definition: RedirectServiceTest.php:66
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlReturnsUrlForTypeUrl
‪getTargetUrlReturnsUrlForTypeUrl()
Definition: RedirectServiceTest.php:454
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectSpecificToDomainOnFlatMatchIfSpecificAndNonSpecificExist
‪matchRedirectReturnsRedirectSpecificToDomainOnFlatMatchIfSpecificAndNonSpecificExist()
Definition: RedirectServiceTest.php:318
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlRespectsAdditionalParametersFromTypolink
‪getTargetUrlRespectsAdditionalParametersFromTypolink()
Definition: RedirectServiceTest.php:584
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnRespectQueryParametersMatchWithSlash
‪matchRedirectReturnsRedirectOnRespectQueryParametersMatchWithSlash()
Definition: RedirectServiceTest.php:170
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsOnlyActiveRedirects
‪matchRedirectReturnsOnlyActiveRedirects()
Definition: RedirectServiceTest.php:398
‪TYPO3\CMS\Redirects\Service\RedirectService
Definition: RedirectService.php:41
‪TYPO3\CMS\Core\Site\SiteFinder
Definition: SiteFinder.php:31
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnRespectQueryParametersMatch
‪matchRedirectReturnsRedirectOnRespectQueryParametersMatch()
Definition: RedirectServiceTest.php:137
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\$redirectCacheServiceProphecy
‪RedirectCacheService ObjectProphecy $redirectCacheServiceProphecy
Definition: RedirectServiceTest.php:41
‪TYPO3\CMS\Redirects\Tests\Unit\Service
Definition: RedirectServiceTest.php:3
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnFlatMatch
‪matchRedirectReturnsRedirectOnFlatMatch(string $path='')
Definition: RedirectServiceTest.php:81
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlReturnsNullIfUrlCouldNotBeResolved
‪getTargetUrlReturnsNullIfUrlCouldNotBeResolved()
Definition: RedirectServiceTest.php:440
‪TYPO3\CMS\Core\Http\Uri
Definition: Uri.php:27
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:39
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\setUp
‪setUp()
Definition: RedirectServiceTest.php:51
‪TYPO3\CMS\Redirects\Service\RedirectCacheService
Definition: RedirectCacheService.php:31
‪TYPO3\CMS\Redirects\Service\RedirectService\getTargetUrl
‪UriInterface null getTargetUrl(array $matchedRedirect, array $queryParams, UriInterface $uri, ?SiteInterface $site=null)
Definition: RedirectService.php:174
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsMatchingRedirectWithMatchingQueryParametersOverMatchingPath
‪matchRedirectReturnsMatchingRedirectWithMatchingQueryParametersOverMatchingPath()
Definition: RedirectServiceTest.php:269
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: RedirectServiceTest.php:37
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\$redirectService
‪RedirectService $redirectService
Definition: RedirectServiceTest.php:49
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:34
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:23
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnFullRespectQueryParametersMatch
‪matchRedirectReturnsRedirectOnFullRespectQueryParametersMatch()
Definition: RedirectServiceTest.php:203
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlReturnsUrlForTypeFile
‪getTargetUrlReturnsUrlForTypeFile()
Definition: RedirectServiceTest.php:479
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnFlatMatchDataProvider
‪array matchRedirectReturnsRedirectOnFlatMatchDataProvider()
Definition: RedirectServiceTest.php:113
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlAddsExistingQueryParams
‪getTargetUrlAddsExistingQueryParams()
Definition: RedirectServiceTest.php:559
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsNullOnPartialRespectQueryParametersMatch
‪matchRedirectReturnsNullOnPartialRespectQueryParametersMatch()
Definition: RedirectServiceTest.php:236
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\matchRedirectReturnsRedirectOnRegexMatch
‪matchRedirectReturnsRedirectOnRegexMatch()
Definition: RedirectServiceTest.php:366
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlReturnsUrlForTypeFolder
‪getTargetUrlReturnsUrlForTypeFolder()
Definition: RedirectServiceTest.php:506
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Core\Resource\Exception\InvalidPathException
Definition: InvalidPathException.php:21
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\$linkServiceProphecy
‪LinkService ObjectProphecy $linkServiceProphecy
Definition: RedirectServiceTest.php:45
‪TYPO3\CMS\Redirects\Tests\Unit\Service\RedirectServiceTest\getTargetUrlRespectsForceHttps
‪getTargetUrlRespectsForceHttps()
Definition: RedirectServiceTest.php:534