2 /***************************************************************
5 * (c) 2010-2011 Oliver Klee (typo3-coding@oliverklee.de)
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.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
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.
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
26 * Testcase for the t3lib_beUserAuth class in the TYPO3 Core extension.
31 * @author Oliver Klee <typo3-coding@oliverklee.de>
33 class t3lib_beUserAuthTest
extends tx_phpunit_testcase
{
35 * @var t3lib_beUserAuth
37 private $fixture = NULL;
39 public function setUp() {
40 $this->fixture
= new t3lib_beUserAuth();
43 public function tearDown() {
44 unset($this->fixture
);
46 t3lib_formProtection_Factory
::purgeInstances();
50 /////////////////////////////////////////
51 // Tests concerning the form protection
52 /////////////////////////////////////////
57 public function logoffCleansFormProtection() {
58 $formProtection = $this->getMock(
59 't3lib_formprotection_BackendFormProtection', array('clean')
61 $formProtection->expects($this->atLeastOnce())->method('clean');
62 t3lib_formProtection_Factory
::set(
63 't3lib_formprotection_BackendFormProtection', $formProtection
66 $this->fixture
->logoff();