Fixed bug #17490: After introducing the locking in #17289 no CSRF token will ever...
[Packages/TYPO3.CMS.git] / tests / t3lib / t3lib_arraybrowserTest.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2010-2011 Oliver Klee (typo3-coding@oliverklee.de)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * Testcase for the t3lib_arrayBrowser class in the TYPO3 Core.
27 *
28 * @package TYPO3
29 * @subpackage t3lib
30 *
31 * @author Oliver Klee <typo3-coding@oliverklee.de>
32 */
33 class t3lib_arrayBrowserTest extends tx_phpunit_testcase {
34 /**
35 * @var t3lib_arrayBrowser
36 */
37 private $fixture;
38
39 public function setUp() {
40 $this->fixture = new t3lib_arrayBrowser();
41 }
42
43 public function tearDown() {
44 unset($this->fixture);
45 }
46
47
48 ///////////////////////////////
49 // Tests concerning depthKeys
50 ///////////////////////////////
51
52 /**
53 * @test
54 */
55 public function depthKeysWithEmptyFirstParameterAddsNothing() {
56 $this->assertEquals(
57 array(),
58 $this->fixture->depthKeys(array(), array())
59 );
60 }
61
62 /**
63 * @test
64 */
65 public function depthKeysWithNumericKeyAddsOneNumberForKeyFromFirstArray() {
66 $this->assertEquals(
67 array(0 => 1),
68 $this->fixture->depthKeys(array('foo'), array())
69 );
70 }
71 }
72 ?>