‪TYPO3CMS  11.5
DemandTest.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 
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
23 class ‪DemandTest extends UnitTestCase
24 {
29  {
30  return [
31  [[1, '', '', [], '', '', []], []],
32  [[2, '', '', ['host'], '', '', []], ['source_host' => 'host']],
33  [[3, '', '', [], 'path', '', []], ['source_path' => 'path']],
34  [[4, '', '', [], '', 'target', []], ['target' => 'target']],
35  [[5, '', '', [], '', '', [301]], ['target_statuscode' => 301]],
36  [[6, '', '', ['host'], '', 'target'], ['source_host' => 'host', 'target' => 'target']],
37  [[7, '', '', [], 'path', '', [302]], ['source_path' => 'path', 'target_statuscode' => 302]],
38  [[8, '', '', ['host'], 'path', 'target', [307]], ['source_path' => 'path', 'source_host' => 'host', 'target' => 'target', 'target_statuscode' => 307]],
39  ];
40  }
41 
48  public function ‪getParametersRespectsDemandState(array $input, array $expected): void
49  {
50  self::assertEquals($expected, (new ‪Demand(...$input))->getParameters());
51  }
52 }
‪TYPO3\CMS\Redirects\Repository\Demand
Definition: Demand.php:28
‪TYPO3\CMS\Redirects\Tests\Unit\Repository
Definition: DemandTest.php:18
‪TYPO3\CMS\Redirects\Tests\Unit\Repository\DemandTest\getParametersRespectsDemandStateStateDataProvider
‪array getParametersRespectsDemandStateStateDataProvider()
Definition: DemandTest.php:28
‪TYPO3\CMS\Redirects\Tests\Unit\Repository\DemandTest\getParametersRespectsDemandState
‪getParametersRespectsDemandState(array $input, array $expected)
Definition: DemandTest.php:48
‪TYPO3\CMS\Redirects\Tests\Unit\Repository\DemandTest
Definition: DemandTest.php:24