removed obsolete security tests

This commit is contained in:
franck
2013-07-09 11:51:14 +02:00
parent aa6fe04eec
commit 33f8bc67a6
2 changed files with 0 additions and 87 deletions

View File

@@ -1,49 +0,0 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Tests\Security;
use Thelia\Core\Security\SecurityManager;
/**
*
* @author Franck Allimant <franck@cqfdev.fr>
*
*/
class SecurityManagerTest extends \PHPUnit_Framework_TestCase
{
public function testGetSetToken()
{
/*
$context = new SecurityManager($authProvider)(
$this->getMock('AuthenticationProviderInterface'),
$this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')
);
$this->assertNull($context->getToken());
$context->setToken($token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'));
$this->assertSame($token, $context->getToken());
*/
// $this->assertFalse(1==1, "faux !");
}
}

View File

@@ -1,38 +0,0 @@
<?php
use Thelia\Core\Security\Token\UsernamePasswordToken;
class UsernamePasswordTokenTest extends \PHPUnit_Framework_TestCase
{
public function testConstructor()
{
$token = new UsernamePasswordToken('username', 'password');
$this->assertFalse($token->isAuthenticated());
$token = new UsernamePasswordToken('username', 'password', true);
$this->assertTrue($token->isAuthenticated());
}
/**
* @expectedException LogicException
*/
public function testSetAuthenticatedToTrue()
{
$token = new UsernamePasswordToken('foo', 'bar', true);
$token->setAuthenticated(true);
}
public function testSetAuthenticatedToFalse()
{
$token = new UsernamePasswordToken('foo', 'bar', true);
$token->setAuthenticated(false);
$this->assertFalse($token->isAuthenticated());
}
public function testEraseCredentials()
{
$token = new UsernamePasswordToken('foo', 'bar', true);
$token->eraseCredentials();
$this->assertEquals('', $token->getCredentials());
}
}