|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2009-2011 Marcus Krause <marcus#exp2009@t3sec.info> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * A copy is found in the textfile GPL.txt and important notices to the license 00017 * from the author is found in LICENSE.txt distributed with these scripts. 00018 * 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 /** 00028 * Contains testcases for "tx_saltedpasswords_div" 00029 * that provides various helper functions. 00030 * 00031 * $Id: tx_saltedpasswords_divTest.php 10120 2011-01-18 20:03:36Z ohader $ 00032 */ 00033 00034 /** 00035 * Testcases for class tx_saltedpasswords_div. 00036 * 00037 * @author Marcus Krause <marcus#exp2009@t3sec.info> 00038 * @package TYPO3 00039 * @subpackage tx_saltedpasswords 00040 */ 00041 class tx_saltedpasswords_divTest extends tx_phpunit_testcase { 00042 protected $backupGlobals = TRUE; 00043 00044 public function setUp() { 00045 00046 } 00047 00048 public function tearDown() { 00049 00050 } 00051 00052 /** 00053 * @test 00054 */ 00055 public function doesReturnExtConfReturnDefaultSettingsIfNoExtensionConfigurationIsFound() { 00056 $this->assertEquals( 00057 tx_saltedpasswords_div::returnExtConfDefaults(), 00058 tx_saltedpasswords_div::returnExtConf('TEST_MODE') 00059 ); 00060 } 00061 00062 /** 00063 * @test 00064 */ 00065 public function doesReturnExtConfReturnMergedSettingsIfExtensionConfigurationIsFound() { 00066 $setting = array('setting' => 1); 00067 00068 $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['saltedpasswords'] = serialize( 00069 array('TEST_MODE.' => $setting) 00070 ); 00071 00072 $this->assertEquals( 00073 array_merge(tx_saltedpasswords_div::returnExtConfDefaults(), $setting), 00074 tx_saltedpasswords_div::returnExtConf('TEST_MODE') 00075 ); 00076 } 00077 } 00078 ?>
1.8.0