‪TYPO3CMS  11.5
ArrayBrowserTest.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 
24 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
25 
26 class ‪ArrayBrowserTest extends UnitTestCase
27 {
28  protected ‪$resetSingletonInstances = true;
29 
31  // Tests concerning depthKeys
33 
37  {
38  GeneralUtility::setSingletonInstance(UriBuilder::class, new ‪UriBuilder(new ‪Router()));
39  $subject = new ‪ArrayBrowser();
40  self::assertEquals([], $subject->depthKeys([], []));
41  }
42 
47  {
48  GeneralUtility::setSingletonInstance(UriBuilder::class, new ‪UriBuilder(new ‪Router()));
49  $subject = new ‪ArrayBrowser();
50  self::assertEquals([0 => 1], $subject->depthKeys(['foo'], []));
51  }
52 }
‪TYPO3\CMS\Backend\Tests\Unit\View\ArrayBrowserTest\$resetSingletonInstances
‪$resetSingletonInstances
Definition: ArrayBrowserTest.php:28
‪TYPO3\CMS\Backend\Tests\Unit\View\ArrayBrowserTest\depthKeysWithNumericKeyAddsOneNumberForKeyFromFirstArray
‪depthKeysWithNumericKeyAddsOneNumberForKeyFromFirstArray()
Definition: ArrayBrowserTest.php:46
‪TYPO3\CMS\Backend\Tests\Unit\View\ArrayBrowserTest\depthKeysWithEmptyFirstParameterAddsNothing
‪depthKeysWithEmptyFirstParameterAddsNothing()
Definition: ArrayBrowserTest.php:36
‪TYPO3\CMS\Backend\View\ArrayBrowser
Definition: ArrayBrowser.php:31
‪TYPO3\CMS\Backend\Tests\Unit\View\ArrayBrowserTest
Definition: ArrayBrowserTest.php:27
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:40
‪TYPO3\CMS\Backend\Tests\Unit\View
Definition: ArrayBrowserTest.php:18
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Backend\Routing\Router
Definition: Router.php:39