‪TYPO3CMS  11.5
SettingsDataProvider.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 {
32  public static function ‪storageFoldersDataProvider(): array
33  {
34  return [
35  ['1', 1, [1, 2]],
36  ['2', 0, [2]],
37  ['1, 5', 0, [1, 5]],
38  [' 1', 250, [1, 2, 3, 4]],
39  ['1,5 ', 250, [1, 2, 3, 4, 5, 6]],
40  ];
41  }
42 
47  public static function ‪treeListMethodMock($id, $depth): string
48  {
49  $map = [
50  1 => [
51  0 => '',
52  1 => '2',
53  250 => '2,3,4',
54  ],
55  -1 => [
56  0 => '1',
57  1 => '1,2',
58  250 => '1,2,3,4',
59  ],
60  2 => [
61  0 => '',
62  1 => '3',
63  250 => '3',
64  ],
65  -2 => [
66  0 => '2',
67  1 => '2,3',
68  250 => '2,3',
69  ],
70  5 => [
71  0 => '',
72  1 => '6',
73  250 => '6',
74  ],
75  -5 => [
76  0 => '5',
77  1 => '5,6',
78  250 => '5,6',
79  ],
80  ];
81  return $map[$id][$depth];
82  }
83 }
‪TYPO3\CMS\FrontendLogin\Tests\Unit\Controller\SettingsDataProvider\treeListMethodMock
‪static treeListMethodMock($id, $depth)
Definition: SettingsDataProvider.php:47
‪TYPO3\CMS\FrontendLogin\Tests\Unit\Controller
Definition: AbstractLoginControllerTest.php:18
‪TYPO3\CMS\FrontendLogin\Tests\Unit\Controller\SettingsDataProvider
Definition: SettingsDataProvider.php:21
‪TYPO3\CMS\FrontendLogin\Tests\Unit\Controller\SettingsDataProvider\storageFoldersDataProvider
‪static array[] storageFoldersDataProvider()
Definition: SettingsDataProvider.php:32